当前位置: 首页>>代码示例>>C#>>正文


C# SegmentWriteState.SegmentFileName方法代码示例

本文整理汇总了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);
		}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:20,代码来源:FormatPostingsFieldsWriter.cs

示例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);
		}
开发者ID:kstenson,项目名称:NHibernate.Search,代码行数:20,代码来源:DocFieldProcessor.cs

示例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);
		}
开发者ID:Rationalle,项目名称:ravendb,代码行数:22,代码来源:DocFieldProcessor.cs


注:本文中的Lucene.Net.Index.SegmentWriteState.SegmentFileName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。