You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/08/13 06:36:12 UTC
[GitHub] [lucene-solr] gautamworah96 commented on a change in pull request #1733: LUCENE-9450 Use BinaryDocValues in the taxonomy writer
gautamworah96 commented on a change in pull request #1733:
URL: https://github.com/apache/lucene-solr/pull/1733#discussion_r469727743
##########
File path: lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
##########
@@ -323,8 +323,10 @@ public FacetLabel getPath(int ordinal) throws IOException {
}
}
- Document doc = indexReader.document(ordinal);
- FacetLabel ret = new FacetLabel(FacetsConfig.stringToPath(doc.get(Consts.FULL)));
+ boolean found = MultiDocValues.getBinaryValues(indexReader, Consts.FULL).advanceExact(catIDInteger);
Review comment:
Thank you for looking at it so closely (and helping in debugging).
The new PR has the following changes:
1. Use `ordinal` instead of `catIDInteger` (IntelliJ says that boxing is anyways not needed, perhaps we can remove?)
2. Use the correct `values` instance that has advanced to the correct `docId`
3. Use `ReaderUtil` to get to the `leaf` and then use `LeafReader` instead of using the higher level `MultiDocValues` call
TEST:
`ant test` in the `lucene-solr/lucene/facets` directory (passes successfully)
`ant precommit`
I've not added any new tests because this PR changes a low level implementation detail and the current tests already cover this
The next step is to run lucene benchmarks!
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org