Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexReader.totalTermFreq()


  }
 
  public static void getTermInfo(Directory dir, Term term) throws Exception {
    IndexReader reader = DirectoryReader.open(dir);
    System.out.printf("%s:%s \t totalTF = %,d \t doc freq = %,d \n",
         term.field(), term.text(), reader.totalTermFreq(term), reader.docFreq(term));
  }
  
  private static void usage() {
    System.out
        .println("\n\nusage:\n\t"
View Full Code Here


  }
 
  public static void getTermInfo(Directory dir, Term term) throws Exception {
    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));
  }
  
  private static void usage() {
    System.out
        .println("\n\nusage:\n\t"
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.