From e26c0b7125903e24e5865b825f0f9e993eb10178 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Fri, 25 Mar 2016 13:49:25 -0700 Subject: [PATCH] SOLR-8902: fix glob test (put back the fields.clear()) --- .../src/java/org/apache/solr/search/SolrReturnFields.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 b667f0e2e46..34ef79e674f 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);