Apache Solr open-source search software
Enhance Javadocs for ExternalFileField on how to return values as part of document fields. SOLR-14968
Eric Pughd0ba0f38a9d0
diff --git a/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java b/solr/core/src/java/org/apache/solr/schema/ExternalFileField.javaindex e7a26b77c5d..b8042ddce07 100644--- a/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java+++ b/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java@@ -51,6 +51,7 @@ import org.apache.solr.uninverting.UninvertingReader.Type;* <p>If the external file has already been loaded, and it is changed, those changes will not be visible until a commit has been done.* <p>The external file may be sorted or unsorted by the key field, but it will be substantially slower (untested) if it isn't sorted.* <p>Fields of this type may currently only be used as a ValueSource in a FunctionQuery.+ * <p>You can return the value as a field in the document by wrapping it like so: <code>fl=id,field(inventory_count)</code>.** @see ExternalFileFieldReloader*/@@ -78,7 +79,7 @@ public class ExternalFileField extends FieldType implements SchemaAware {FileFloatSource source = getFileFloatSource(field);return source.getSortField(reverse);}-+@Overridepublic Type getUninversionType(SchemaField sf) {return null;@@ -123,7 +124,7 @@ public class ExternalFileField extends FieldType implements SchemaAware {@Overridepublic void inform(IndexSchema schema) {this.schema = schema;-+if (keyFieldName != null && schema.getFieldType(keyFieldName).isPointField()) {throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"keyField '" + keyFieldName + "' has a Point field type, which is not supported.");