alessandrobenedetti commented on PR #1245:
URL: https://github.com/apache/solr/pull/1245#issuecomment-1361847032

   Hi @dsmiley ,
   once we have the Lucene changes, the idea is to change this method:
   org.apache.solr.search.QueryUtils#combineQueryAndFilter
   with an additional if clause:
   `else {
           return new BooleanQuery.Builder()
               .add(scoreQuery, Occur.MUST)
               .add(filterQuery, Occur.FILTER)
               .build();
         }`
         
         will become:
         `else if{scoreQuery instanceof KnnVectorQuery}{
         return new KnnVectorQuery(scoreQuery,filterQuery);} 
         else{
           return new BooleanQuery.Builder()
               .add(scoreQuery, Occur.MUST)
               .add(filterQuery, Occur.FILTER)
               .build();
         }`
   
   Just to give an idea, the final code will look different as we will have to 
create a new instance of KnnVectorQuery using the getters of the old one.
   With this change, we will be able to simplify the KnnQueryParser removing 
all the stuff for pre-filters and post-filters.
   GetProcessedFilters will be called just once as usual and we'll get the 
benefit of caching and post-0filter separation automatically.
   SolrIndexSearcher won't be touched at all.
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to