Enhance Javadocs for ExternalFileField on how to return values as part of document fields. SOLR-14968

* add helpful documentation on returning the field value

* wordsmith
This commit is contained in:
Eric Pugh 2020-10-29 12:38:41 -04:00 committed by GitHub
parent 462c6c70d1
commit d0ba0f38a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}
@Override
public Type getUninversionType(SchemaField sf) {
return null;
@ -123,7 +124,7 @@ public class ExternalFileField extends FieldType implements SchemaAware {
@Override
public 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.");