You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2016/06/16 13:46:26 UTC

[6/8] lucene-solr:branch_5x: SOLR-8902: fix glob test (put back the fields.clear())

SOLR-8902: fix glob test (put back the fields.clear())


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cd8cccd2
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cd8cccd2
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cd8cccd2

Branch: refs/heads/branch_5x
Commit: cd8cccd228cbbf4ae807b4fda008a099f8ea8b19
Parents: 8a91a93
Author: Ryan McKinley <ry...@apache.org>
Authored: Fri Mar 25 13:49:25 2016 -0700
Committer: Steve Rowe <sa...@apache.org>
Committed: Wed Jun 15 19:22:17 2016 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/solr/search/SolrReturnFields.java     | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cd8cccd2/solr/core/src/java/org/apache/solr/search/SolrReturnFields.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrReturnFields.java b/solr/core/src/java/org/apache/solr/search/SolrReturnFields.java
index b667f0e..34ef79e 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrReturnFields.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrReturnFields.java
@@ -130,6 +130,13 @@ public class SolrReturnFields extends ReturnFields {
       }
       augmenters.addTransformer( new RenameFieldTransformer( from, to, copy ) );
     }
+    if( !_wantsAllFields && !globs.isEmpty() ) {
+      // TODO??? need to fill up the fields with matching field names in the index
+      // and add them to okFieldNames?
+      // maybe just get all fields?
+      // this would disable field selection optimization... i think thatis OK
+      fields.clear(); // this will get all fields, and use wantsField to limit
+    }
 
     if( augmenters.size() == 1 ) {
       transformer = augmenters.getTransformer(0);