madrob commented on a change in pull request #1456:
URL: https://github.com/apache/lucene-solr/pull/1456#discussion_r418739528



##########
File path: 
solr/core/src/java/org/apache/solr/response/GeoJSONResponseWriter.java
##########
@@ -292,11 +293,18 @@ else if(geo instanceof WriteableGeoJSON) {
     }
   }
 
+  @Deprecated
   @Override
   public void writeStartDocumentList(String name, 
-      long start, int size, long numFound, Float maxScore) throws IOException
+      long start, int size, long numFound, Float maxScore) throws IOException {
+    throw new UnsupportedOperationException();

Review comment:
       Why? We can't pick a default and still use this?

##########
File path: solr/core/src/java/org/apache/solr/response/JSONWriter.java
##########
@@ -132,11 +133,16 @@ public void writeSolrDocument(String name, SolrDocument 
doc, ReturnFields return
   //       that the size could not be reliably determined.
   //
 
+  /**
+   * This method will be removed in Solr 9

Review comment:
       do you mean solr 10? we don't need a major version with it deprecated 
before we can jettison it? folks upgrading from 8.5->9 might be surprised by 
this.

##########
File path: solr/core/src/java/org/apache/solr/search/QueryResultKey.java
##########
@@ -65,6 +70,7 @@ public QueryResultKey(Query query, List<Query> filters, Sort 
sort, int nc_flags)
       h = h*29 + sf.hashCode();
       ramSfields += BASE_SF_RAM_BYTES_USED + 
RamUsageEstimator.sizeOfObject(sf.getField());
     }
+    h = h*31 + minExactHits;

Review comment:
       this is going to overflow in the default case, is that ok?

##########
File path: solr/core/src/java/org/apache/solr/search/MaxScoreCollector.java
##########
@@ -37,9 +37,7 @@ public float getMaxScore() {
 
   @Override
   public ScoreMode scoreMode() {
-    // Should be TOP_SCORES but this would wrap the scorer unnecessarily since
-    // this collector is only used in a MultiCollector.
-    return ScoreMode.COMPLETE;
+    return ScoreMode.TOP_SCORES;

Review comment:
       why can we make this change?

##########
File path: solr/core/src/test/org/apache/solr/request/TestFaceting.java
##########
@@ -931,5 +934,28 @@ public void testListedTermCounts() throws Exception {
         
"//lst[@name='facet_fields']/lst[@name='title_ws']/int[2][@name='Book2']",
         
"//lst[@name='facet_fields']/lst[@name='title_ws']/int[3][@name='Book3']");
   }
+  
+  @Test
+  public void testFacetCountsWithMinExactHits() throws Exception {
+    final int NUM_DOCS = 20;
+    for (int i = 0; i < NUM_DOCS ; i++) {
+      assertU(adoc("id", String.valueOf(i), "title_ws", "Book1"));
+      assertU(commit());
+    }
+    ModifiableSolrParams params = new ModifiableSolrParams();
+    params.set("q", "title_ws:Book1");
+    params.set(FacetParams.FACET, "true");
+    params.set(FacetParams.FACET_FIELD, "title_ws");
+    assertQ(req(params),
+        
"//lst[@name='facet_fields']/lst[@name='title_ws']/int[1][@name='Book1'][.='20']"
+        ,"//*[@hitCountRelation='" + HitCountRelation.EQ + "']"
+        ,"//*[@numFound='" + NUM_DOCS + "']");
+    
+    // It doesn't matter if we request munExactHits, when requesting facets, 
the numFound value is precise

Review comment:
       s/mun/min




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



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

Reply via email to