gsmiller commented on a change in pull request #443:
URL: https://github.com/apache/lucene/pull/443#discussion_r749715273
##########
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'm not entirely sure this is correct. This tells us that the taxonomy
index was created with an 8.x or newer version, but doesn't tell us anything
about the version of the main index. It's assuming that the same version is
used to create both the taxonomy index and main index. Is it possible for these
versions to not match? I wonder if we need to account for that situation? If
so, I'm not entirely how to go about doing so as we don't have any information
about the main index here in this class. So that would need some more thought.
--
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]