com.groupbyinc.flux.common.apache.lucene.misc.HighFreqTerms.class Maven / Gradle / Ivy
???? 4 ? ;com/groupbyinc/flux/common/apache/lucene/misc/HighFreqTerms java/lang/Object HighFreqTerms.java Jcom/groupbyinc/flux/common/apache/lucene/misc/HighFreqTerms$TermStatsQueue TermStatsQueue Scom/groupbyinc/flux/common/apache/lucene/misc/HighFreqTerms$TotalTermFreqComparator TotalTermFreqComparator Mcom/groupbyinc/flux/common/apache/lucene/misc/HighFreqTerms$DocFreqComparator DocFreqComparator DEFAULT_NUMTERMS I d ()V
this =Lcom/groupbyinc/flux/common/apache/lucene/misc/HighFreqTerms; main ([Ljava/lang/String;)V java/lang/Exception ALcom/groupbyinc/flux/common/apache/lucene/util/SuppressForbidden; reason &System.out required: command line tool java/lang/NumberFormatException java/lang/String ! usage #
$ java/lang/System & exit (I)V ( )
' * java/nio/file/Paths , get ;(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path; . /
- 0 :com/groupbyinc/flux/common/apache/lucene/store/FSDirectory 2 open R(Ljava/nio/file/Path;)Lcom/groupbyinc/flux/common/apache/lucene/store/FSDirectory; 4 5
3 6
8com/groupbyinc/flux/common/apache/lucene/store/Directory 9 java/util/Comparator ; -t = equals (Ljava/lang/Object;)Z ? @
" A
java/lang/Integer D parseInt (Ljava/lang/String;)I F G
E H >com/groupbyinc/flux/common/apache/lucene/index/DirectoryReader J |(Lcom/groupbyinc/flux/common/apache/lucene/store/Directory;)Lcom/groupbyinc/flux/common/apache/lucene/index/DirectoryReader; 4 L
K M getHighFreqTerms ?(Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader;ILjava/lang/String;Ljava/util/Comparator;)[Lcom/groupbyinc/flux/common/apache/lucene/misc/TermStats; O P
Q :com/groupbyinc/flux/common/apache/lucene/index/IndexReader S :[Lcom/groupbyinc/flux/common/apache/lucene/misc/TermStats; U out Ljava/io/PrintStream; W X ' Y java/util/Locale [ ROOT Ljava/util/Locale; ] ^ \ _ '%s:%s totalTF = %,d docFreq = %,d
a 7com/groupbyinc/flux/common/apache/lucene/misc/TermStats c field Ljava/lang/String; e f d g termtext 8Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef; i j d k 6com/groupbyinc/flux/common/apache/lucene/util/BytesRef m utf8ToString ()Ljava/lang/String; o p
n q
totalTermFreq J s t d u java/lang/Long w valueOf (J)Ljava/lang/Long; y z
x { docFreq } d ~ (I)Ljava/lang/Integer; y ?
E ? java/io/PrintStream ? printf N(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream; ? ?
? ? close ?
T ? e !Ljava/lang/NumberFormatException; i args [Ljava/lang/String; numTerms dir :Lcom/groupbyinc/flux/common/apache/lucene/store/Directory;
comparator QLjava/util/Comparator; Ljava/util/Comparator; reader