Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-66

Lucy::Util::IndexFileNames -- utilities for processing index file paths



    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:


      This implementation of IndexFileNames only supplies a handful of minor utility
      functions. It has has less in it than the corresponding Lucene class, because
      Lucy will delegate much more to the individual index components than Lucene.
      For instance, the top level library will remain ignorant of what DocWriter
      chooses to name its files. We choose never to rely on filename conventions so
      that replacement components can be swapped in without requiring that they
      write certain files or adhere to specific naming schemes.

      The only important function provided right now is IxFileNames_extract_gen:

      /** Skip past the first instance of an underscore in the CharBuf, then
       * attempt to decode a base 36 number.  For example, "snapshot_5.json"
       * yields 5, and "seg_a1" yields 27.
       * @return a generation number, or 0 if no number can be extracted.
      inert i32_t
      extract_gen(const CharBuf *name);

      Later, after Folder is added, we'll add IxFileNames_latest_snapshot, which
      will scan the root level of a Folder for the snapshot file with the highest


        1. TestIndexFileNames.c
          3 kB
          Marvin Humphrey
        2. TestIndexFileNames.bp
          0.7 kB
          Marvin Humphrey
        3. IndexFileNames.pm
          1 kB
          Marvin Humphrey
        4. IndexFileNames.c
          2 kB
          Marvin Humphrey
        5. IndexFileNames.bp
          1 kB
          Marvin Humphrey
        6. index_file_names.diff
          0.5 kB
          Marvin Humphrey
        7. 033-index_file_names.t
          0.1 kB
          Marvin Humphrey



            • Assignee:
              marvin Marvin Humphrey
              marvin Marvin Humphrey
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: