You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/03/27 17:57:21 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1381: SOLR-14364: LTR SolrFeature fq improvements

dsmiley commented on a change in pull request #1381: SOLR-14364: LTR SolrFeature fq improvements
URL: https://github.com/apache/lucene-solr/pull/1381#discussion_r399444698
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
 ##########
 @@ -228,12 +226,8 @@ private void searchWithTimeLimiter(Query query,
       collector = MultiCollector.wrap(collector, hitCountCollector);
     }
 
-    if (filter.filter != null) {
-      query = new BooleanQuery.Builder()
-          .add(query, Occur.MUST)
-          .add(filter.filter, Occur.FILTER)
-          .build();
-    }
+    query = QueryUtils.combineQueryAndFilter(query, filter.filter);
 
 Review comment:
   If the parsed query is null (e.g. was stopwords or something), then the end effect is matching nothing.  You can see this in the former logic by seeing solrQueryWeight getting set to null.  In the new logic, this is done via setting query to MatchNoDocsQuery, and thus "query" variable is non-null.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org