本文整理汇总了C#中Lucene.Net.Index.TermEnum类的典型用法代码示例。如果您正苦于以下问题:C# TermEnum类的具体用法?C# TermEnum怎么用?C# TermEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TermEnum类属于Lucene.Net.Index命名空间,在下文中一共展示了TermEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SegmentMergeInfo
internal SegmentMergeInfo(int b, TermEnum te, IndexReader r)
{
base_Renamed = b;
reader = r;
termEnum = te;
term = te.Term;
}
示例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);
}
示例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
var segmentTermEnum = ((SegmentTermEnum) termEnum);
term = segmentTermEnum.Term;
ti = segmentTermEnum.TermInfo();
}
else
{
// punt case
term = termEnum.Term;
ti = parent.core.GetTermsReader().Get(term);
}
Seek(ti, term);
}
示例4: FilterTermEnum
public FilterTermEnum(TermEnum in_Renamed)
{
this.in_Renamed = in_Renamed;
}
示例5: IndexDirectory
private static void IndexDirectory(IndexWriter writer, TermEnum uidIter, DirectoryInfo dir, Operation operation) {
var entries = Directory.GetFileSystemEntries(dir.FullName);
// Sort the entries. This is important, the uidIter TermEnum is
// iterated in a forward-only fashion, requiring all files to be
// passed in ascending order.
Array.Sort(entries);
foreach (var entry in entries) {
var path = Path.Combine(dir.FullName, entry);
if (Directory.Exists(path)) {
IndexDirectory(writer, uidIter, new DirectoryInfo(path), operation);
} else if (File.Exists(path)) {
IndexFile(writer, uidIter, new FileInfo(path), operation);
}
}
}
示例6: ParallelTermEnum
public ParallelTermEnum(ParallelReader enclosingInstance)
{
InitBlock(enclosingInstance);
try
{
field = ((System.String) Enclosing_Instance.fieldToReader.GetKey(0));
}
catch (ArgumentOutOfRangeException e)
{
// No fields, so keep field == null, termEnum == null
return;
}
if (field != null)
termEnum = ((IndexReader) Enclosing_Instance.fieldToReader[field]).Terms();
}
示例7: ParallelTermEnum
public ParallelTermEnum(ParallelReader enclosingInstance, Term term)
{
InitBlock(enclosingInstance);
field = term.Field();
termEnum = ((IndexReader) Enclosing_Instance.fieldToReader[field]).Terms(term);
}
示例8: ParallelTermEnum
public ParallelTermEnum(ParallelReader enclosingInstance)
{
InitBlock(enclosingInstance);
IEnumerator<string> e = Enclosing_Instance.fieldToReader.Keys.GetEnumerator();
if (e.MoveNext())
{
field = e.Current;
if (field != null)
termEnum = Enclosing_Instance.fieldToReader[field].Terms();
}
}
示例9: Seek
public virtual void Seek(TermEnum termEnum)
{
in_Renamed.Seek(termEnum);
}
示例10: TestTermEnum
public TestTermEnum(TermEnum termEnum):base(termEnum)
{
}
示例11: Seek
public virtual void Seek(TermEnum termEnum)
{
Seek(termEnum.Term());
if (termEnum is MultiTermEnum)
{
tenum = (MultiTermEnum) termEnum;
if (topReader != tenum.topReader)
tenum = null;
}
}
示例12: Seek
/// <summary> Not implemented.</summary>
/// <throws> UnsupportedOperationException </throws>
public virtual void Seek(TermEnum termEnum)
{
throw new System.NotSupportedException();
}
示例13: Seek
public virtual void Seek(TermEnum termEnum)
{
Seek(termEnum.Term);
var multiTermEnum = termEnum as MultiTermEnum;
if (multiTermEnum != null)
{
tenum = multiTermEnum;
if (topReader != tenum.topReader)
tenum = null;
}
}
示例14: Seek
public virtual void Seek(TermEnum termEnum)
{
Seek(termEnum.Term());
}
示例15: Seek
public SeekStatus Seek(String value)
{
termEnum = reader.Terms(new Term(this.fieldName, value));
Term t = Term();
if (t == null)
return SeekStatus.END;
return (t.Text.Equals(value)) ? SeekStatus.FOUND : SeekStatus.NOT_FOUND;
}