本文整理汇总了C#中Lucene.Net.Index.SegmentWriteState.SegmentFileName方法的典型用法代码示例。如果您正苦于以下问题:C# SegmentWriteState.SegmentFileName方法的具体用法?C# SegmentWriteState.SegmentFileName怎么用?C# SegmentWriteState.SegmentFileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Index.SegmentWriteState
的用法示例。
在下文中一共展示了SegmentWriteState.SegmentFileName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormatPostingsFieldsWriter
public FormatPostingsFieldsWriter(SegmentWriteState state, FieldInfos fieldInfos):base()
{
dir = state.directory;
segment = state.segmentName;
totalNumDocs = state.numDocs;
this.fieldInfos = fieldInfos;
termsOut = new TermInfosWriter(dir, segment, fieldInfos, state.termIndexInterval);
// TODO: this is a nasty abstraction violation (that we
// peek down to find freqOut/proxOut) -- we need a
// better abstraction here whereby these child consumers
// can provide skip data or not
skipListWriter = new DefaultSkipListWriter(termsOut.skipInterval, termsOut.maxSkipLevels, totalNumDocs, null, null);
SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, state.SegmentFileName(IndexFileNames.TERMS_EXTENSION));
SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, state.SegmentFileName(IndexFileNames.TERMS_INDEX_EXTENSION));
termsWriter = new FormatPostingsTermsWriter(state, this);
}
示例2: Flush
public override void Flush(IDictionary<DocConsumerPerThread, DocConsumerPerThread> threads, SegmentWriteState state)
{
Support.Dictionary<DocFieldConsumerPerThread, IList<DocFieldConsumerPerField>> childThreadsAndFields = new Support.Dictionary<DocFieldConsumerPerThread, IList<DocFieldConsumerPerField>>();
foreach (DocFieldProcessorPerThread perThread in threads.Keys)
{
childThreadsAndFields[perThread.consumer] = perThread.Fields();
perThread.TrimFields(state);
}
fieldsWriter.Flush(state);
consumer.Flush(childThreadsAndFields, state);
// Important to save after asking consumer to flush so
// consumer can alter the FieldInfo* if necessary. EG,
// FreqProxTermsWriter does this with
// FieldInfo.storePayload.
System.String fileName = state.SegmentFileName(IndexFileNames.FIELD_INFOS_EXTENSION);
fieldInfos.Write(state.directory, fileName);
state.flushedFiles.Add(fileName);
}
示例3: Flush
public override void Flush(System.Collections.ICollection threads, SegmentWriteState state)
{
System.Collections.IDictionary childThreadsAndFields = new System.Collections.Hashtable();
System.Collections.IEnumerator it = threads.GetEnumerator();
while (it.MoveNext())
{
DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread) ((System.Collections.DictionaryEntry) it.Current).Key;
childThreadsAndFields[perThread.consumer] = perThread.Fields();
perThread.TrimFields(state);
}
fieldsWriter.Flush(state);
consumer.Flush(childThreadsAndFields, state);
// Important to save after asking consumer to flush so
// consumer can alter the FieldInfo* if necessary. EG,
// FreqProxTermsWriter does this with
// FieldInfo.storePayload.
System.String fileName = state.SegmentFileName(IndexFileNames.FIELD_INFOS_EXTENSION);
fieldInfos.Write(state.directory, fileName);
SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, fileName);
}