[
https://issues.apache.org/jira/browse/LUCENE-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-2282:
-------------------------------
Attachment: LUCENE-2282.patch
Patch provides:
* IFN constants and methods as public
* segmentFileName concatenates the name and extension w/ '.', using a
StringBuilder. Using SB is a minor efficiency, and since the + operator on
strings allocate it anyway, I figure we'd better allocate it directly,
especially when two + operators are involved.
* matchesExtension checks whether a filename matches an extension
* fileNameFromGeneration adds the '.' when neccessary.
* Core code does not concatenate file, '.' and extension on its own, but uses
IFN.
All core tests pass. I have a local problem w/ contrib tests (the Analyzers
data dir is locked for some reason and I cannot unlock it), but I see no
reasons for them to fail.
If this can go out in 3.0.2 instead of waiting for 3.1, then all the better.
> Expose IndexFileNames as public, and make use of its methods in the code
> ------------------------------------------------------------------------
>
> Key: LUCENE-2282
> URL: https://issues.apache.org/jira/browse/LUCENE-2282
> Project: Lucene - Java
> Issue Type: Improvement
> Reporter: Shai Erera
> Fix For: 3.1
>
> Attachments: LUCENE-2282.patch
>
>
> IndexFileNames is useful for applications that extend Lucene, an in
> particular those who extend Directory or IndexWriter. It provides useful
> constants and methods to query whether a certain file is a core Lucene file
> or not. In addition, IndexFileNames should be used by Lucene's code to
> generate segment file names, or query whether a certain file matches a
> certain extension.
> I'll post the patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]