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



##########
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()) {

Review comment:
       I think we can assume/require that taxo index is always be re-created 
with the main index, but that is indeed a risk for users.  I haven't seen any 
users fall into this trap over the years :)




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to