Lucene - Core
  1. Lucene - Core
  2. LUCENE-2741

Several Codecs use the same files - PerFieldCodecWrapper can not hold two codec using the same files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently we have a rather simple file naming scheme which prevents us from using more than one codec in a segment that relies on the same file. For instance pulsing and standard codec can not be used together since they both need the .frq .tii .tis etc. To make this work we either need to write distinct per codec files or set a per field / codec file ID. While the first solution seems to be quiet verbose the second one seems to be more flexible too.

      One possibility to do that would be to assign a unique id to each SegmentsWriteState when opening the FieldsConsumer and write the IDs into the segments file to eventually load it once the segment is opened. Otherwise our PerFieldCodec feature will not be really flexible nor useful though.

      1. LUCENE-2741.patch
        46 kB
        Simon Willnauer

        Issue Links

          Activity

          Hide
          Simon Willnauer added a comment -

          Here is a first patch which all testcases passing. I also changed TestPerFieldCodecSupport to exhaustively use codec writing files with the same extension - all passes.

          simon

          Show
          Simon Willnauer added a comment - Here is a first patch which all testcases passing. I also changed TestPerFieldCodecSupport to exhaustively use codec writing files with the same extension - all passes. simon
          Hide
          Simon Willnauer added a comment -

          If nobody objects I will commit this soon!

          Show
          Simon Willnauer added a comment - If nobody objects I will commit this soon!
          Hide
          Simon Willnauer added a comment -

          Committed in revision: 1035354

          Show
          Simon Willnauer added a comment - Committed in revision: 1035354
          Hide
          Simon Willnauer added a comment -

          For the record : this is also a file format change and requires reindexing if somebody uses indexes build with Lucene-Trunk

          Show
          Simon Willnauer added a comment - For the record : this is also a file format change and requires reindexing if somebody uses indexes build with Lucene-Trunk

            People

            • Assignee:
              Simon Willnauer
              Reporter:
              Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development