gsmiller commented on a change in pull request #264:
URL: https://github.com/apache/lucene/pull/264#discussion_r745151660



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetLabels.java
##########
@@ -62,7 +62,17 @@ public TaxonomyFacetLabels(TaxonomyReader taxoReader, String 
indexFieldName) thr
    * @throws IOException when a low-level IO issue occurs
    */
   public FacetLabelReader getFacetLabelReader(LeafReaderContext readerContext) 
throws IOException {
-    return new FacetLabelReader(ordsReader, readerContext);
+    // Support older binary format by leveraging an OrdinalsReader, which can 
still support both
+    // formats for now:
+    // TODO: Remove in Lucene 11
+    if (FacetUtils.usesOlderBinaryOrdinals(readerContext.reader(), 
indexFieldName)) {
+      OrdinalsReader ordsReader = new DocValuesOrdinalsReader(indexFieldName);

Review comment:
       We could probably improve this by only creating the OrdinalsReader once 
and "caching" it, although we'd need to synchronize (or just best effort reuse).




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