mikemccand commented on a change in pull request #443:
URL: https://github.com/apache/lucene/pull/443#discussion_r751810539



##########
File path: lucene/MIGRATE.md
##########
@@ -443,3 +443,16 @@ structure. Use a standard BoostQuery here instead.
 
 Rather than using `setSort()` to change sort values, you should instead create
 a new Sort instance with the new values.
+
+## Taxonomy-based faceting uses more modern encodings (LUCENE-9450, 
LUCENE-10062, LUCENE-10122)

Review comment:
       Thanks!  This is awesome!  I think we just need to clarify that `full 
index rebuild` means start an entirely new index with 9.x.

##########
File path: lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
##########
@@ -409,9 +410,26 @@ private void processFacetFields(
         indexDrillDownTerms(doc, indexFieldName, dimConfig, facetLabel);
       }
 
-      // Facet counts:
-      // DocValues are considered stored fields:
-      doc.add(new BinaryDocValuesField(indexFieldName, 
dedupAndEncode(ordinals.get())));
+      // Store the taxonomy ordinals associated with each doc. Prefer to use 
SortedNumericDocValues
+      // but "fall back" to a custom binary format to maintain backwards 
compatibility with Lucene 8
+      // indexes.
+      if (taxoWriter.useNumericDocValuesForOrdinals()) {
+        // Dedupe and encode the ordinals. It's not important that we sort here
+        // (SortedNumericDocValuesField will handle this internally), but we

Review comment:
       I think we need @jpountz to answer :)  He is our "sorting police-person".
   
   And, yeah, we must do the sort here to dedup.  I'm just curious if Lucene is 
then efficient on receiving an already sorted `SNDVF`s.




-- 
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...@lucene.apache.org

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