本文整理汇总了C#中Term.field方法的典型用法代码示例。如果您正苦于以下问题:C# Term.field方法的具体用法?C# Term.field怎么用?C# Term.field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Term
的用法示例。
在下文中一共展示了Term.field方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PKIndexSplitter
/// <summary>
/// Split an index based on a given primary key term
/// and a 'middle' term. If the middle term is present, it's
/// sent to dir2.
/// </summary>
public PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Term midTerm) : this(version, input, dir1, dir2, new TermRangeFilter(midTerm.field(), null, midTerm.bytes(), true, false))
{
}
示例2: getTermInfo
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static void getTermInfo(org.apache.lucene.store.Directory dir, org.apache.lucene.index.Term term) throws Exception
public static void getTermInfo(Directory dir, Term term)
{
IndexReader reader = DirectoryReader.open(dir);
System.out.printf(Locale.ROOT, "%s:%s \t totalTF = %,d \t doc freq = %,d \n", term.field(), term.text(), reader.totalTermFreq(term), reader.docFreq(term));
}