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


C# TermEnum.Term方法代码示例

本文整理汇总了C#中Lucene.Net.Index.TermEnum.Term方法的典型用法代码示例。如果您正苦于以下问题:C# TermEnum.Term方法的具体用法?C# TermEnum.Term怎么用?C# TermEnum.Term使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lucene.Net.Index.TermEnum的用法示例。


在下文中一共展示了TermEnum.Term方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getPositions

        private TermPositions postings; // use getPositions()

        #endregion Fields

        #region Constructors

        internal SegmentMergeInfo(int b, TermEnum te, IndexReader r)
        {
            base_Renamed = b;
            reader = r;
            termEnum = te;
            term = te.Term();
        }
开发者ID:BackupTheBerlios,项目名称:lyra2-svn,代码行数:13,代码来源:SegmentMergeInfo.cs

示例2: Seek

		public virtual void  Seek(TermEnum termEnum)
		{
			TermInfo ti;
			
			// use comparison of fieldinfos to verify that termEnum belongs to the same segment as this SegmentTermDocs
			if (termEnum is SegmentTermEnum && ((SegmentTermEnum) termEnum).fieldInfos == parent.fieldInfos)
			// optimized case
				ti = ((SegmentTermEnum) termEnum).TermInfo();
			// punt case
			else
				ti = parent.tis.Get(termEnum.Term());
			
			Seek(ti);
		}
开发者ID:zweib730,项目名称:beagrep,代码行数:14,代码来源:SegmentTermDocs.cs

示例3: Seek

		public virtual void  Seek(TermEnum termEnum)
		{
			TermInfo ti;
			Term term;
			
			// use comparison of fieldinfos to verify that termEnum belongs to the same segment as this SegmentTermDocs
			if (termEnum is SegmentTermEnum && ((SegmentTermEnum) termEnum).fieldInfos == parent.core.fieldInfos)
			{
				// optimized case
				SegmentTermEnum segmentTermEnum = ((SegmentTermEnum) termEnum);
				term = segmentTermEnum.Term();
				ti = segmentTermEnum.TermInfo();
			}
			else
			{
				// punt case
				term = termEnum.Term();
				ti = parent.core.GetTermsReader().Get(term);
			}
			
			Seek(ti, term);
		}
开发者ID:jhuntsman,项目名称:FlexNet,代码行数:22,代码来源:SegmentTermDocs.cs

示例4: Seek

			public virtual void  Seek(TermEnum termEnum)
			{
				Seek(termEnum.Term());
			}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:4,代码来源:ParallelReader.cs

示例5: Next

			public override bool Next()
			{
				if (termEnum == null)
					return false;
				
				// another term in this field?
				if (termEnum.Next() && (System.Object) termEnum.Term().Field() == (System.Object) field)
					return true; // yes, keep going
				
				termEnum.Close(); // close old termEnum
				
				// find the next field with terms, if any
				if (fieldIterator == null)
				{
                    System.Collections.Comparer comparer = System.Collections.Comparer.Default;
                    System.Collections.SortedList newList = new System.Collections.SortedList();
                    if (Enclosing_Instance.fieldToReader != null)
                    {
                        if (Enclosing_Instance.fieldToReader.Count > 0)
                        {
                            int index = 0;
                            while (comparer.Compare(Enclosing_Instance.fieldToReader.GetKey(index), field) < 0)
                                index++;
                            for (; index < Enclosing_Instance.fieldToReader.Count; index++)
                            {
                                newList.Add(Enclosing_Instance.fieldToReader.GetKey(index), Enclosing_Instance.fieldToReader[Enclosing_Instance.fieldToReader.GetKey(index)]);
                            }
                        }
                    }

                    fieldIterator = newList.Keys.GetEnumerator();
                    fieldIterator.MoveNext();
					System.Object generatedAux = fieldIterator.Current; // Skip field to get next one
				}
				while (fieldIterator.MoveNext())
				{
					field = ((System.String) fieldIterator.Current);
					termEnum = ((IndexReader) Enclosing_Instance.fieldToReader[field]).Terms(new Term(field));
					Term term = termEnum.Term();
					if (term != null && (System.Object) term.Field() == (System.Object) field)
						return true;
					else
						termEnum.Close();
				}
				
				return false; // no more fields
			}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:47,代码来源:ParallelReader.cs

示例6: Next

			public override bool Next()
			{
				if (termEnum == null)
					return false;
				
				// another term in this field?
				if (termEnum.Next() && (System.Object) termEnum.Term().Field() == (System.Object) field)
					return true; // yes, keep going
				
				termEnum.Close(); // close old termEnum
				
				// find the next field with terms, if any
				if (fieldIterator == null)
				{
                    List<string> tmpList = new List<string>();
                    bool m = false;
                    //JAVA: fieldIterator = fieldToReader.tailMap(field).keySet().iterator();
                    //JAVA: fieldIterator.next();  // Skip field to get next one
                    foreach (string key in Enclosing_Instance.fieldToReader.Keys)
                    {
                        if (key == field && m==false) m = true;
                        if (m) tmpList.Add(key);
                    }
                    fieldIterator = tmpList.GetEnumerator();
				}
				while (fieldIterator.MoveNext())
				{
					field =  fieldIterator.Current;
					termEnum = Enclosing_Instance.fieldToReader[field].Terms(new Term(field));
					Term term = termEnum.Term();
					if (term != null && (System.Object) term.Field() == (System.Object) field)
						return true;
					else
						termEnum.Close();
				}
				
				return false; // no more fields
			}
开发者ID:jhuntsman,项目名称:FlexNet,代码行数:38,代码来源:ParallelReader.cs

示例7: Seek

			public virtual void  Seek(TermEnum termEnum)
			{
				Seek(termEnum.Term());
				if (termEnum is MultiTermEnum)
				{
					tenum = (MultiTermEnum) termEnum;
					if (topReader != tenum.topReader)
						tenum = null;
				}
			}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:10,代码来源:DirectoryReader.cs

示例8: Next

			public override bool Next()
			{
				if (termEnum == null)
					return false;
				
				// another term in this field?
				if (termEnum.Next() && (System.Object) termEnum.Term().Field() == (System.Object) field)
					return true; // yes, keep going
				
				termEnum.Close(); // close old termEnum
				
				// find the next field with terms, if any
				if (fieldIterator == null)
				{
					fieldIterator = SupportClass.TailMap(Enclosing_Instance.fieldToReader, field).Keys.GetEnumerator();
                    fieldIterator.MoveNext();                     // Skip field to get next one
				}
				while (fieldIterator.MoveNext())
				{
					field = ((System.String) fieldIterator.Current);
					termEnum = ((IndexReader) Enclosing_Instance.fieldToReader[field]).Terms(new Term(field, ""));
					Term term = termEnum.Term();
					if (term != null && (System.Object) term.Field() == (System.Object) field)
						return true;
					else
						termEnum.Close();
				}
				
				return false; // no more fields
			}
开发者ID:zweib730,项目名称:beagrep,代码行数:30,代码来源:ParallelReader.cs

示例9: Next

            public override bool Next()
            {
                if (termEnum == null)
                    return false;

                // another term in this field?
                if (termEnum.Next() && (object) termEnum.Term().Field() == (object) field)
                    return true; // yes, keep going

                termEnum.Close(); // close old termEnum

                // find the next field with terms, if any
                if (fieldIterator == null)
                {
                    fieldIterator = SupportClass.CollectionsSupport.TailMap(Enclosing_Instance.fieldToReader, field).Keys.GetEnumerator();
                }
                while (fieldIterator.MoveNext())
                {
                    field = fieldIterator.Current;
                    termEnum = Enclosing_Instance.fieldToReader[field].Terms(new Term(field));
                    Term term = termEnum.Term();
                    if (term != null && (object) term.Field() == (object) field)
                        return true;
                    else
                        termEnum.Close();
                }

                return false; // no more fields
            }
开发者ID:cqm0609,项目名称:lucene-file-finder,代码行数:29,代码来源:ParallelReader.cs


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