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

                 Key: LUCY-66
                 URL: https://issues.apache.org/jira/browse/LUCY-66
             Project: Lucy
          Issue Type: Improvement
          Components: Core
            Reporter: Marvin Humphrey
            Assignee: Marvin Humphrey



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:

{code:none}
/** 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);
{code}

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
generation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to