本文整理汇总了C#中Lucene.Net.Index.ParallelReader.Terms方法的典型用法代码示例。如果您正苦于以下问题:C# ParallelReader.Terms方法的具体用法?C# ParallelReader.Terms怎么用?C# ParallelReader.Terms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Index.ParallelReader
的用法示例。
在下文中一共展示了ParallelReader.Terms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test1
public virtual void Test1()
{
ParallelReader pr = new ParallelReader();
pr.Add(ir1);
pr.Add(ir2);
TermDocs td = pr.TermDocs();
TermEnum te = pr.Terms();
Assert.IsTrue(te.Next());
Assert.AreEqual("field1:brown", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field1:fox", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field1:jumps", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field1:quick", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field1:the", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field2:brown", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field2:fox", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field2:jumps", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field2:quick", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field2:the", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field3:dog", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field3:fox", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field3:jumps", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field3:lazy", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
Assert.AreEqual("field3:over", te.Term.ToString());
td.Seek(te.Term);
Assert.IsTrue(td.Next());
Assert.AreEqual(0, td.Doc);
Assert.IsFalse(td.Next());
Assert.IsTrue(te.Next());
//.........这里部分代码省略.........