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/05/15 04:20:23 UTC

[GitHub] [lucene-solr] tflobbe commented on a change in pull request #1517: SOLR-13289: Use the final collector's scoreMode

tflobbe commented on a change in pull request #1517:
URL: https://github.com/apache/lucene-solr/pull/1517#discussion_r425557741



##########
File path: solr/core/src/test/org/apache/solr/search/SolrIndexSearcherTest.java
##########
@@ -189,12 +206,95 @@ public void testMinExactHitsWithMaxScoreRequested() throws IOException {
       cmd.setMinExactHits(2);
       cmd.setFlags(SolrIndexSearcher.GET_SCORES);
       cmd.setQuery(new TermQuery(new Term("field1_s", "foo")));
-      searcher.search(new QueryResult(), cmd);
       QueryResult qr = new QueryResult();
       searcher.search(qr, cmd);
       assertMatchesGraterThan(NUM_DOCS, qr);
       assertNotEquals(Float.NaN, qr.getDocList().maxScore());
       return null;
     });
   }
+  
+  public void testMinExactWithFilters() throws Exception {
+    
+    h.getCore().withSearcher(searcher -> {
+      //Sanity Check - No Filter
+      QueryCommand cmd = new QueryCommand();
+      cmd.setMinExactHits(1);
+      cmd.setLen(1);
+      cmd.setFlags(SolrIndexSearcher.NO_CHECK_QCACHE | SolrIndexSearcher.NO_SET_QCACHE);

Review comment:
       just trying to make the test cover specifically what I was working on. It can definitely be done with a higher level test or integration test. 




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



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