|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.index.IndexFileNames
public final class IndexFileNames
This class contains useful constants representing filenames and extensions
used by lucene, as well as convenience methods for querying whether a file
name matches an extension (matchesExtension
), as well as generating file names from a segment name,
generation and extension (
fileNameFromGeneration
,
segmentFileName
).
Field Summary | |
---|---|
static String[] |
COMPOUND_EXTENSIONS
File extensions of old-style index files |
static String |
COMPOUND_FILE_EXTENSION
Extension of compound file |
static String |
COMPOUND_FILE_STORE_EXTENSION
Extension of compound file for doc store files |
static String |
DELETABLE
Name of the index deletable file (only used in pre-lockless indices) |
static String |
DELETES_EXTENSION
Extension of deletes |
static String |
FIELD_INFOS_EXTENSION
Extension of field infos |
static String |
FIELDS_EXTENSION
Extension of stored fields file |
static String |
FIELDS_INDEX_EXTENSION
Extension of stored fields index file |
static String |
FREQ_EXTENSION
Extension of freq postings file |
static String |
GEN_EXTENSION
Extension of gen file |
static String[] |
INDEX_EXTENSIONS
This array contains all filename extensions used by Lucene's index files, with two exceptions, namely the extension made up from .f + a number and
from .s + a number. |
static String[] |
INDEX_EXTENSIONS_IN_COMPOUND_FILE
File extensions that are added to a compound file (same as above, minus "del", "gen", "cfs"). |
static String[] |
NON_STORE_INDEX_EXTENSIONS
|
static String |
NORMS_EXTENSION
Extension of norms file |
static String |
PLAIN_NORMS_EXTENSION
Extension of plain norms |
static String |
PROX_EXTENSION
Extension of prox postings file |
static String |
SEGMENTS
Name of the index segment file |
static String |
SEGMENTS_GEN
Name of the generation reference file name |
static String |
SEPARATE_NORMS_EXTENSION
Extension of separate norms |
static String[] |
STORE_INDEX_EXTENSIONS
|
static String |
TERMS_EXTENSION
Extension of terms file |
static String |
TERMS_INDEX_EXTENSION
Extension of terms index file |
static String[] |
VECTOR_EXTENSIONS
File extensions for term vector support |
static String |
VECTORS_DOCUMENTS_EXTENSION
Extension of vectors documents file |
static String |
VECTORS_FIELDS_EXTENSION
Extension of vectors fields file |
static String |
VECTORS_INDEX_EXTENSION
Extension of vectors index file |
Constructor Summary | |
---|---|
IndexFileNames()
|
Method Summary | |
---|---|
static String |
fileNameFromGeneration(String base,
String ext,
long gen)
Computes the full file name from base, extension and generation. |
static boolean |
isDocStoreFile(String fileName)
Returns true if the provided filename is one of the doc store files (ends with an extension in STORE_INDEX_EXTENSIONS ). |
static boolean |
isSeparateNormsFile(String filename)
Returns true if the given filename ends with the separate norms file pattern: SEPARATE_NORMS_EXTENSION + "[0-9]+" . |
static boolean |
matchesExtension(String filename,
String ext)
Returns true if the given filename ends with the given extension. |
static String |
segmentFileName(String segmentName,
String ext)
Returns the file name that matches the given segment name and extension. |
static String |
stripSegmentName(String filename)
Strips the segment file name out of the given one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SEGMENTS
public static final String SEGMENTS_GEN
public static final String DELETABLE
public static final String NORMS_EXTENSION
public static final String FREQ_EXTENSION
public static final String PROX_EXTENSION
public static final String TERMS_EXTENSION
public static final String TERMS_INDEX_EXTENSION
public static final String FIELDS_INDEX_EXTENSION
public static final String FIELDS_EXTENSION
public static final String VECTORS_FIELDS_EXTENSION
public static final String VECTORS_DOCUMENTS_EXTENSION
public static final String VECTORS_INDEX_EXTENSION
public static final String COMPOUND_FILE_EXTENSION
public static final String COMPOUND_FILE_STORE_EXTENSION
public static final String DELETES_EXTENSION
public static final String FIELD_INFOS_EXTENSION
public static final String PLAIN_NORMS_EXTENSION
public static final String SEPARATE_NORMS_EXTENSION
public static final String GEN_EXTENSION
public static final String[] INDEX_EXTENSIONS
.f
+ a number and
from .s
+ a number. Also note that
Lucene's segments_N
files do not have any
filename extension.
public static final String[] INDEX_EXTENSIONS_IN_COMPOUND_FILE
public static final String[] STORE_INDEX_EXTENSIONS
public static final String[] NON_STORE_INDEX_EXTENSIONS
public static final String[] COMPOUND_EXTENSIONS
public static final String[] VECTOR_EXTENSIONS
Constructor Detail |
---|
public IndexFileNames()
Method Detail |
---|
public static final String fileNameFromGeneration(String base, String ext, long gen)
ext
is
not an empty string.
base
- main part of the file nameext
- extension of the filenamegen
- generationpublic static final boolean isDocStoreFile(String fileName)
STORE_INDEX_EXTENSIONS
).
public static final String segmentFileName(String segmentName, String ext)
ext
is not empty.
public static final boolean matchesExtension(String filename, String ext)
public static final String stripSegmentName(String filename)
segmentFileName(java.lang.String, java.lang.String)
or fileNameFromGeneration(java.lang.String, java.lang.String, long)
to create your
files, then this method simply removes whatever comes before the first '.',
or the second '_' (excluding both), in case of deleted docs.
public static boolean isSeparateNormsFile(String filename)
SEPARATE_NORMS_EXTENSION + "[0-9]+"
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |