mirror of https://github.com/apache/lucene.git
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:
parent
462c6c70d1
commit
d0ba0f38a9
|
@ -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.");
|
||||
|
|
Loading…
Reference in New Issue