You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ep...@apache.org on 2020/10/29 16:40:04 UTC

[lucene-solr] branch branch_8x updated: Enhance Javadocs for ExternalFileField on how to return values as part of document fields. SOLR-14968

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 4af2dda  Enhance Javadocs for ExternalFileField on how to return values as part of document fields. SOLR-14968
4af2dda is described below

commit 4af2ddaf4e197f256cf523bd6f37c8ff87800d2b
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Thu Oct 29 12:38:41 2020 -0400

    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
---
 solr/core/src/java/org/apache/solr/schema/ExternalFileField.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java b/solr/core/src/java/org/apache/solr/schema/ExternalFileField.java
index e7a26b7..b8042dd 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);
   }
-  
+
   @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.");