Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10228

PerFieldKnnVectorsFormat can write to wrong format name

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0, 9.1
    • None
    • New

    Description

      Currently when creating a KnnVectorsWriter for merging, we consult the existing "PER_FIELD_SUFFIX_KEY" attribute to determine the format's per-field suffix. This isn't correct since we could be using a new codec (that produces different formats/ suffixes).

      The attached PR modifies TestPerFieldDocValuesFormat#testMergeUsesNewFormat to trigger the problem. Without the fix we get an error like "java.nio.file.FileAlreadyExistsException: File "_3_Lucene90HnswVectorsFormat_0.vem" was already written to."

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              julietibs Julie Tibshirani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h