gautamworah96 commented on a change in pull request #179:
URL: https://github.com/apache/lucene/pull/179#discussion_r698055359
##########
File path:
lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
##########
@@ -89,6 +89,28 @@ private void createNewTaxonomyIndex(String dirName) throws
IOException {
dir.close();
}
+ // Opens up a pre-existing index and tries to run getBulkPath on it
+ public void testGetBulkPathOnOlderCodec() throws Exception {
+ Path indexDir = createTempDir(oldTaxonomyIndexName);
+ TestUtil.unzip(getDataInputStream(oldTaxonomyIndexName + ".zip"),
indexDir);
+ Directory dir = newFSDirectory(indexDir);
+
+ DirectoryTaxonomyWriter writer = new DirectoryTaxonomyWriter(dir);
+ DirectoryTaxonomyReader reader = new DirectoryTaxonomyReader(writer);
+
+ FacetLabel[] facetLabels = {
+ new FacetLabel("a"), new FacetLabel("b"),
+ };
+ int[] ordinals =
+ new int[] {reader.getOrdinal(facetLabels[0]),
reader.getOrdinal(facetLabels[1])};
+ // The zip file already contains a category "a" and a category "b" stored
with the older
Review comment:
We have already added this condition in the `createNewTaxonomyIndex()`
test (i.e the back compat test we had added for the BDV switch). See
[here](https://github.com/apache/lucene/blob/56eb76dbaf7b2e9a4fbf7c1a25af2ba81ab1bc92/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java#L74)
--
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]