19 using Lucene.Net.Support;
21 namespace Lucene.Net.Index
29 public const System.String SEGMENTS =
"segments";
32 public const System.String SEGMENTS_GEN =
"segments.gen";
37 public const System.String DELETABLE =
"deletable";
40 public const System.String NORMS_EXTENSION =
"nrm";
43 public const System.String FREQ_EXTENSION =
"frq";
46 public const System.String PROX_EXTENSION =
"prx";
49 public const System.String TERMS_EXTENSION =
"tis";
52 public const System.String TERMS_INDEX_EXTENSION =
"tii";
55 public const System.String FIELDS_INDEX_EXTENSION =
"fdx";
58 public const System.String FIELDS_EXTENSION =
"fdt";
61 public const System.String VECTORS_FIELDS_EXTENSION =
"tvf";
64 public const System.String VECTORS_DOCUMENTS_EXTENSION =
"tvd";
67 public const System.String VECTORS_INDEX_EXTENSION =
"tvx";
70 public const System.String COMPOUND_FILE_EXTENSION =
"cfs";
73 public const System.String COMPOUND_FILE_STORE_EXTENSION =
"cfx";
76 internal const System.String DELETES_EXTENSION =
"del";
79 public const System.String FIELD_INFOS_EXTENSION =
"fnm";
82 public const System.String PLAIN_NORMS_EXTENSION =
"f";
85 public const System.String SEPARATE_NORMS_EXTENSION =
"s";
88 public const System.String GEN_EXTENSION =
"gen";
97 public static readonly System.String[] INDEX_EXTENSIONS =
new System.String[]{COMPOUND_FILE_EXTENSION, FIELD_INFOS_EXTENSION, FIELDS_INDEX_EXTENSION, FIELDS_EXTENSION, TERMS_INDEX_EXTENSION, TERMS_EXTENSION, FREQ_EXTENSION, PROX_EXTENSION, DELETES_EXTENSION, VECTORS_INDEX_EXTENSION, VECTORS_DOCUMENTS_EXTENSION, VECTORS_FIELDS_EXTENSION, GEN_EXTENSION, NORMS_EXTENSION, COMPOUND_FILE_STORE_EXTENSION};
102 public static readonly System.String[] INDEX_EXTENSIONS_IN_COMPOUND_FILE =
new System.String[]{FIELD_INFOS_EXTENSION, FIELDS_INDEX_EXTENSION, FIELDS_EXTENSION, TERMS_INDEX_EXTENSION, TERMS_EXTENSION, FREQ_EXTENSION, PROX_EXTENSION, VECTORS_INDEX_EXTENSION, VECTORS_DOCUMENTS_EXTENSION, VECTORS_FIELDS_EXTENSION, NORMS_EXTENSION};
104 public static readonly System.String[] STORE_INDEX_EXTENSIONS =
new System.String[]{VECTORS_INDEX_EXTENSION, VECTORS_FIELDS_EXTENSION, VECTORS_DOCUMENTS_EXTENSION, FIELDS_INDEX_EXTENSION, FIELDS_EXTENSION};
106 public static readonly System.String[] NON_STORE_INDEX_EXTENSIONS =
new System.String[]{FIELD_INFOS_EXTENSION, FREQ_EXTENSION, PROX_EXTENSION, TERMS_EXTENSION, TERMS_INDEX_EXTENSION, NORMS_EXTENSION};
109 public static readonly System.String[] COMPOUND_EXTENSIONS =
new System.String[]{FIELD_INFOS_EXTENSION, FREQ_EXTENSION, PROX_EXTENSION, FIELDS_INDEX_EXTENSION, FIELDS_EXTENSION, TERMS_INDEX_EXTENSION, TERMS_EXTENSION};
112 public static readonly System.String[] VECTOR_EXTENSIONS =
new System.String[]{VECTORS_INDEX_EXTENSION, VECTORS_DOCUMENTS_EXTENSION, VECTORS_FIELDS_EXTENSION};
126 public static System.String FileNameFromGeneration(System.String base_Renamed, System.String extension,
long gen)
134 return base_Renamed + extension;
138 #if !PRE_LUCENE_NET_2_0_0_COMPATIBLE
141 return base_Renamed +
"_" + System.Convert.ToString(gen, 16) + extension;
150 internal static bool IsDocStoreFile(System.String fileName)
152 if (fileName.EndsWith(COMPOUND_FILE_STORE_EXTENSION))
154 for (
int i = 0; i < STORE_INDEX_EXTENSIONS.Length; i++)
155 if (fileName.EndsWith(STORE_INDEX_EXTENSIONS[i]))
160 internal static System.String SegmentFileName(System.String segmentName, System.String ext)
162 return segmentName +
"." + ext;