cpoerschke commented on a change in pull request #1407: Use QueryUtils.combineQueryAndFilter more URL: https://github.com/apache/lucene-solr/pull/1407#discussion_r406349680
########## File path: solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java ########## @@ -1660,9 +1656,7 @@ private DocSet getDocListAndSetNC(QueryResult qr, QueryCommand cmd) throws IOExc ProcessedFilter pf = getProcessedFilter(cmd.getFilter(), cmd.getFilterList()); Query query = QueryUtils.makeQueryable(cmd.getQuery()); - if (pf.filter != null) { - query = new BooleanQuery.Builder().add(query, Occur.MUST).add(pf.filter, Occur.FILTER).build(); - } + query = QueryUtils.combineQueryAndFilter(query, pf.filter); Review comment: ```suggestion final Query query = QueryUtils.combineQueryAndFilter(QueryUtils.makeQueryable(cmd.getQuery()), pf.filter); ``` could provide clarity w.r.t. `query` not subsequently changing though the `QueryUtils...QueryUtils` bit is a bit ugly perhaps. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org