You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2021/07/29 17:12:37 UTC

[lucene] branch main updated (ba417b5 -> 56eb76d)

This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git.


    from ba417b5  LUCENE-10032: Remove leafDocMaps from MergeState (#222)
     new 7cb6960  Category documents added in the Lucene 9.0 taxonomy index use a BDV field with a different name
     new 162131e  Use BDV or a StoredField based on the Lucene version that has created the last index commit
     new be0a3e5  Move the version check to a final variable that is initialized in the constructor
     new cec1912  Fix minor logic
     new bd3174d  PR fixes 1. Change negation to  2. Move statement inside if condition
     new 56eb76d  Simplify some code

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../directory/DirectoryTaxonomyWriter.java         |  31 ++++++++++++++-------
 .../directory/TestBackwardsCompatibility.java      |  19 +++++++------
 .../taxonomy/directory/taxonomy.8.10.0-cfs.zip     | Bin 0 -> 3092 bytes
 .../taxonomy/directory/taxonomy.8.6.3-cfs.zip      | Bin 3058 -> 0 bytes
 4 files changed, 31 insertions(+), 19 deletions(-)
 create mode 100644 lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.10.0-cfs.zip
 delete mode 100644 lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.6.3-cfs.zip

[lucene] 01/06: Category documents added in the Lucene 9.0 taxonomy index use a BDV field with a different name

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 7cb696041c30474ae16e90d5209eb9f342da1149
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Wed Jul 21 01:08:53 2021 -0700

    Category documents added in the Lucene 9.0 taxonomy index use a
    BDV field with a different name
    
    Using BDV fields with a different "$full_path_binary$" name
    ensures that the earlier "$full_path$" StringField does not have the same name as the
    BDV field and hence they don't violate the field type consistency check
    (LUCENE-9334).
    
    This commit also enables the back-compat check that was disabled
    earlier.
---
 .../src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java     | 1 +
 .../apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java | 2 +-
 .../apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java | 2 +-
 .../lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java     | 1 -
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
index 104bfdf..5bc253f 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
@@ -21,6 +21,7 @@ import org.apache.lucene.util.BytesRef;
 /** @lucene.experimental */
 abstract class Consts {
   static final String FULL = "$full_path$";
+  static final String FULL_BINARY = "$full_path_binary$";
   static final String FIELD_PAYLOADS = "$payloads$";
   static final String PAYLOAD_PARENT = "p";
   static final BytesRef PAYLOAD_PARENT_BYTES_REF = new BytesRef(PAYLOAD_PARENT);
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
index ea38d8c..71d3481 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
@@ -335,7 +335,7 @@ public class DirectoryTaxonomyReader extends TaxonomyReader implements Accountab
     int readerIndex = ReaderUtil.subIndex(ordinal, indexReader.leaves());
     LeafReader leafReader = indexReader.leaves().get(readerIndex).reader();
     // TODO: Use LUCENE-9476 to get the bulk lookup API for extracting BinaryDocValues
-    BinaryDocValues values = leafReader.getBinaryDocValues(Consts.FULL);
+    BinaryDocValues values = leafReader.getBinaryDocValues(Consts.FULL_BINARY);
 
     FacetLabel ret;
 
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index ad0c74c..53445b1 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -476,7 +476,7 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, categoryPath.length);
     fullPathField.setStringValue(fieldPath);
     d.add(fullPathField);
-    d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
+    d.add(new BinaryDocValuesField(Consts.FULL_BINARY, new BytesRef(fieldPath)));
 
     // Note that we do no pass an Analyzer here because the fields that are
     // added to the Document are untokenized or contains their own TokenStream.
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
index 05142b8..76138bd 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
@@ -55,7 +55,6 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
   // Old taxonomy index had $full_path$ field indexed only with postings,
   // It is not allowed to add the same field $full_path$ indexed with BinaryDocValues
   // for a new segment, that this test is trying to do.
-  @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/LUCENE-9334")
   public void testCreateNewTaxonomy() throws IOException {
     createNewTaxonomyIndex(oldTaxonomyIndexName);
   }

[lucene] 05/06: PR fixes 1. Change negation to 2. Move statement inside if condition

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit bd3174de10750a4d1cf858d5653868a41fe120dc
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Tue Jul 27 14:16:35 2021 -0700

    PR fixes 1. Change negation to  2. Move statement inside if condition
---
 .../lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index aad0b52..38fa3f5 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -157,7 +157,7 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     // after we opened the writer, and the index is locked, it's safe to check
     // the commit data and read the index epoch
     openMode = config.getOpenMode();
-    if (!DirectoryReader.indexExists(directory)) {
+    if (DirectoryReader.indexExists(directory) == false) {
       indexEpoch = 1;
       // no commit exists so we can safely use the new BinaryDocValues field
       useOlderStoredFieldIndex = false;
@@ -476,11 +476,11 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     d.add(parentStreamField);
 
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, categoryPath.length);
-    fullPathField.setStringValue(fieldPath);
 
     if (useOlderStoredFieldIndex) {
       fullPathField = new StringField(Consts.FULL, fieldPath, Field.Store.YES);
     } else {
+      fullPathField.setStringValue(fieldPath);
       /* Lucene 9 switches to BinaryDocValuesField for storing taxonomy categories */
       d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
     }

[lucene] 04/06: Fix minor logic

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit cec19125fa5132b490c3b25fa5981b541cae3623
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Mon Jul 26 15:54:49 2021 -0700

    Fix minor logic
---
 .../lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java      | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index b3bd340..aad0b52 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -62,7 +62,6 @@ import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.Version;
 
 /**
  * {@link TaxonomyWriter} which uses a {@link Directory} to store the taxonomy information on disk,
@@ -167,8 +166,7 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
 
       SegmentInfos infos = SegmentInfos.readLatestCommit(dir);
       /* a previous commit exists, so check the version of the last commit */
-      useOlderStoredFieldIndex =
-          !infos.getMinSegmentLuceneVersion().onOrAfter(Version.LUCENE_9_0_0);
+      useOlderStoredFieldIndex = infos.getIndexCreatedVersionMajor() <= 8;
 
       Map<String, String> commitData = infos.getUserData();
       if (commitData != null) {

[lucene] 03/06: Move the version check to a final variable that is initialized in the constructor

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit be0a3e5721ee61239e2bab67665d04a39626bd29
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Mon Jul 26 15:21:53 2021 -0700

    Move the version check to a final variable that is initialized in the
    constructor
---
 .../directory/DirectoryTaxonomyWriter.java         | 30 ++++++++++------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index f32fa27..b3bd340 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -92,6 +92,7 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
 
   private final Directory dir;
   private final IndexWriter indexWriter;
+  private final boolean useOlderStoredFieldIndex;
   private final TaxonomyWriterCache cache;
   private final AtomicInteger cacheMisses = new AtomicInteger(0);
 
@@ -125,12 +126,6 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
   private volatile TaxonomyIndexArrays taxoArrays;
   private volatile int nextID;
 
-  /** Reads the commit data from a Directory. */
-  private static Map<String, String> readCommitData(Directory dir) throws IOException {
-    SegmentInfos infos = SegmentInfos.readLatestCommit(dir);
-    return infos.getUserData();
-  }
-
   /**
    * Construct a Taxonomy writer.
    *
@@ -165,9 +160,17 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     openMode = config.getOpenMode();
     if (!DirectoryReader.indexExists(directory)) {
       indexEpoch = 1;
+      // no commit exists so we can safely use the new BinaryDocValues field
+      useOlderStoredFieldIndex = false;
     } else {
       String epochStr = null;
-      Map<String, String> commitData = readCommitData(directory);
+
+      SegmentInfos infos = SegmentInfos.readLatestCommit(dir);
+      /* a previous commit exists, so check the version of the last commit */
+      useOlderStoredFieldIndex =
+          !infos.getMinSegmentLuceneVersion().onOrAfter(Version.LUCENE_9_0_0);
+
+      Map<String, String> commitData = infos.getUserData();
       if (commitData != null) {
         epochStr = commitData.get(INDEX_EPOCH);
       }
@@ -477,16 +480,11 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, categoryPath.length);
     fullPathField.setStringValue(fieldPath);
 
-    boolean commitExists = indexWriter.getLiveCommitData().iterator().hasNext();
-    /* no commits so this is a fresh index, or the old index was built using a Lucene 9 or greater version */
-    if ((commitExists == false)
-        || (SegmentInfos.readLatestCommit(dir)
-            .getMinSegmentLuceneVersion()
-            .onOrAfter(Version.LUCENE_9_0_0))) {
-      /* Lucene 9 introduces BinaryDocValuesField for storing taxonomy categories */
-      d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
-    } else {
+    if (useOlderStoredFieldIndex) {
       fullPathField = new StringField(Consts.FULL, fieldPath, Field.Store.YES);
+    } else {
+      /* Lucene 9 switches to BinaryDocValuesField for storing taxonomy categories */
+      d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
     }
 
     d.add(fullPathField);

[lucene] 06/06: Simplify some code

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 56eb76dbaf7b2e9a4fbf7c1a25af2ba81ab1bc92
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Wed Jul 28 10:01:29 2021 -0700

    Simplify some code
---
 .../facet/taxonomy/directory/DirectoryTaxonomyWriter.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index 38fa3f5..90f1d4e 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -184,7 +184,11 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
     ft.setOmitNorms(true);
     parentStreamField = new Field(Consts.FIELD_PAYLOADS, parentStream, ft);
-    fullPathField = new StringField(Consts.FULL, "", Field.Store.NO);
+    if (useOlderStoredFieldIndex) {
+      fullPathField = new StringField(Consts.FULL, "", Field.Store.YES);
+    } else {
+      fullPathField = new StringField(Consts.FULL, "", Field.Store.NO);
+    }
 
     nextID = indexWriter.getDocStats().maxDoc;
 
@@ -476,11 +480,9 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
     d.add(parentStreamField);
 
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, categoryPath.length);
+    fullPathField.setStringValue(fieldPath);
 
-    if (useOlderStoredFieldIndex) {
-      fullPathField = new StringField(Consts.FULL, fieldPath, Field.Store.YES);
-    } else {
-      fullPathField.setStringValue(fieldPath);
+    if (useOlderStoredFieldIndex == false) {
       /* Lucene 9 switches to BinaryDocValuesField for storing taxonomy categories */
       d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
     }

[lucene] 02/06: Use BDV or a StoredField based on the Lucene version that has created the last index commit

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 162131ecf82bf84cb113d934a1af51842c78bbdf
Author: Gautam Worah <ga...@amazon.com>
AuthorDate: Mon Jul 26 11:50:49 2021 -0700

    Use BDV or a StoredField based on the Lucene version that has created
    the last index commit
    
    If the Lucene version was < 9 then use a StringField or else
    if the index is fresh or if the index is was built using a
    version >= 9, then use a BDV field.
---
 .../lucene/facet/taxonomy/directory/Consts.java       |   1 -
 .../taxonomy/directory/DirectoryTaxonomyReader.java   |   2 +-
 .../taxonomy/directory/DirectoryTaxonomyWriter.java   |  15 ++++++++++++++-
 .../directory/TestBackwardsCompatibility.java         |  18 ++++++++++--------
 .../facet/taxonomy/directory/taxonomy.8.10.0-cfs.zip  | Bin 0 -> 3092 bytes
 .../facet/taxonomy/directory/taxonomy.8.6.3-cfs.zip   | Bin 3058 -> 0 bytes
 6 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
index 5bc253f..104bfdf 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java
@@ -21,7 +21,6 @@ import org.apache.lucene.util.BytesRef;
 /** @lucene.experimental */
 abstract class Consts {
   static final String FULL = "$full_path$";
-  static final String FULL_BINARY = "$full_path_binary$";
   static final String FIELD_PAYLOADS = "$payloads$";
   static final String PAYLOAD_PARENT = "p";
   static final BytesRef PAYLOAD_PARENT_BYTES_REF = new BytesRef(PAYLOAD_PARENT);
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
index 71d3481..ea38d8c 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
@@ -335,7 +335,7 @@ public class DirectoryTaxonomyReader extends TaxonomyReader implements Accountab
     int readerIndex = ReaderUtil.subIndex(ordinal, indexReader.leaves());
     LeafReader leafReader = indexReader.leaves().get(readerIndex).reader();
     // TODO: Use LUCENE-9476 to get the bulk lookup API for extracting BinaryDocValues
-    BinaryDocValues values = leafReader.getBinaryDocValues(Consts.FULL_BINARY);
+    BinaryDocValues values = leafReader.getBinaryDocValues(Consts.FULL);
 
     FacetLabel ret;
 
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
index 53445b1..f32fa27 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
@@ -62,6 +62,7 @@ import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.Version;
 
 /**
  * {@link TaxonomyWriter} which uses a {@link Directory} to store the taxonomy information on disk,
@@ -475,8 +476,20 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {
 
     String fieldPath = FacetsConfig.pathToString(categoryPath.components, categoryPath.length);
     fullPathField.setStringValue(fieldPath);
+
+    boolean commitExists = indexWriter.getLiveCommitData().iterator().hasNext();
+    /* no commits so this is a fresh index, or the old index was built using a Lucene 9 or greater version */
+    if ((commitExists == false)
+        || (SegmentInfos.readLatestCommit(dir)
+            .getMinSegmentLuceneVersion()
+            .onOrAfter(Version.LUCENE_9_0_0))) {
+      /* Lucene 9 introduces BinaryDocValuesField for storing taxonomy categories */
+      d.add(new BinaryDocValuesField(Consts.FULL, new BytesRef(fieldPath)));
+    } else {
+      fullPathField = new StringField(Consts.FULL, fieldPath, Field.Store.YES);
+    }
+
     d.add(fullPathField);
-    d.add(new BinaryDocValuesField(Consts.FULL_BINARY, new BytesRef(fieldPath)));
 
     // Note that we do no pass an Analyzer here because the fields that are
     // added to the Document are untokenized or contains their own TokenStream.
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
index 76138bd..0f05d32 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestBackwardsCompatibility.java
@@ -49,12 +49,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
   //
   // Then move the zip file to your trunk checkout and use it in your test cases
 
-  public static final String oldTaxonomyIndexName = "taxonomy.8.6.3-cfs";
+  public static final String oldTaxonomyIndexName = "taxonomy.8.10.0-cfs";
 
-  // LUCENE-9334 requires consistency of field data structures between documents.
-  // Old taxonomy index had $full_path$ field indexed only with postings,
-  // It is not allowed to add the same field $full_path$ indexed with BinaryDocValues
-  // for a new segment, that this test is trying to do.
   public void testCreateNewTaxonomy() throws IOException {
     createNewTaxonomyIndex(oldTaxonomyIndexName);
   }
@@ -67,8 +63,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
 
     DirectoryTaxonomyWriter writer = new DirectoryTaxonomyWriter(dir);
 
-    FacetLabel cp_b = new FacetLabel("b");
-    writer.addCategory(cp_b);
+    FacetLabel cp_c = new FacetLabel("c");
+    writer.addCategory(cp_c);
     writer.getInternalIndexWriter().forceMerge(1);
     writer.commit();
 
@@ -79,10 +75,15 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
     // Just asserting ord1 != TaxonomyReader.INVALID_ORDINAL is not enough to check compatibility
     assertNotNull(reader.getPath(ord1));
 
-    int ord2 = reader.getOrdinal(cp_b);
+    int ord2 = reader.getOrdinal(new FacetLabel("b"));
     assert ord2 != TaxonomyReader.INVALID_ORDINAL;
+    // Just asserting ord2 != TaxonomyReader.INVALID_ORDINAL is not enough to check compatibility
     assertNotNull(reader.getPath(ord2));
 
+    int ord3 = reader.getOrdinal(cp_c);
+    assert ord3 != TaxonomyReader.INVALID_ORDINAL;
+    assertNotNull(reader.getPath(ord3));
+
     reader.close();
     writer.close();
     dir.close();
@@ -102,6 +103,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
     TaxonomyWriter writer = new DirectoryTaxonomyWriter(dir);
 
     writer.addCategory(new FacetLabel("a"));
+    writer.addCategory(new FacetLabel("b"));
     writer.commit();
     writer.close();
     dir.close();
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.10.0-cfs.zip b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.10.0-cfs.zip
new file mode 100644
index 0000000..a412ab2
Binary files /dev/null and b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.10.0-cfs.zip differ
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.6.3-cfs.zip b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.6.3-cfs.zip
deleted file mode 100644
index d04c706..0000000
Binary files a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/taxonomy.8.6.3-cfs.zip and /dev/null differ