
com.groupbyinc.flux.common.apache.lucene.search.postingshighlight.PostingsHighlighter.class Maven / Gradle / Ivy
???? 3? Ucom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter java/lang/Object PostingsHighlighter.java ocom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$LimitedStoredFieldVisitor LimitedStoredFieldVisitor acom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$OffsetsEnum OffsetsEnum Wcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$4 Wcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$3 Wcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$2 Wcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$1 java/util/Map$Entry
java/util/Map Entry EMPTY_INDEXSEARCHER ?Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher; DEFAULT_MAX_LENGTH I ' maxLength defaultFormatter TLcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageFormatter;
defaultScorer QLcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageScorer; EMPTY =Lcom/groupbyinc/flux/common/apache/lucene/index/PostingsEnum; $assertionsDisabled Z ()V (I)V ' )
* this WLcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter; ' (
.??? "java/lang/IllegalArgumentException 1 %maxLength must be < Integer.MAX_VALUE 3 (Ljava/lang/String;)V ' 5
2 6 8 getBreakIterator -(Ljava/lang/String;)Ljava/text/BreakIterator; java/util/Locale < ROOT Ljava/util/Locale; > ? = @ java/text/BreakIterator B getSentenceInstance -(Ljava/util/Locale;)Ljava/text/BreakIterator; D E
C F field Ljava/lang/String; getFormatter h(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageFormatter; L Ycom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/DefaultPassageFormatter N
O . getScorer e(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageScorer; ! " S Ocom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageScorer U
V . highlight ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;Lcom/groupbyinc/flux/common/apache/lucene/search/TopDocs;)[Ljava/lang/String; java/io/IOException Z ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;Lcom/groupbyinc/flux/common/apache/lucene/search/TopDocs;I)[Ljava/lang/String; X \
] query 7Lcom/groupbyinc/flux/common/apache/lucene/search/Query; searcher topDocs 9Lcom/groupbyinc/flux/common/apache/lucene/search/TopDocs; java/lang/String d highlightFields ?([Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;Lcom/groupbyinc/flux/common/apache/lucene/search/TopDocs;[I)Ljava/util/Map; f g
h get &(Ljava/lang/Object;)Ljava/lang/Object; j k l [Ljava/lang/String; n maxPassages res 6Ljava/util/Map; Ljava/util/Map; ?([Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;Lcom/groupbyinc/flux/common/apache/lucene/search/TopDocs;)Ljava/util/Map; java/util/Arrays u fill ([II)V w x
v y fields [I 7com/groupbyinc/flux/common/apache/lucene/search/TopDocs } scoreDocs ;[Lcom/groupbyinc/flux/common/apache/lucene/search/ScoreDoc; ? ~ ? ? | 8com/groupbyinc/flux/common/apache/lucene/search/ScoreDoc ? doc ? ? ? ?([Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;[I[I)Ljava/util/Map; f ?
? i docids java/util/HashMap ?
? . highlightFieldsAsObjects ? ?
? entrySet ()Ljava/util/Set; ? ? ?
java/util/Set ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? getValue ? ? ? [Ljava/lang/Object; ? getKey ? ? ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? 5com/groupbyinc/flux/common/apache/lucene/search/Query ? =com/groupbyinc/flux/common/apache/lucene/search/IndexSearcher ? toString ()Ljava/lang/String; ? ?
? snippet Ljava/lang/Object; snippetObjects snippetStrings ent ; Ljava/util/Map$Entry; i$ Ljava/util/Iterator; fieldsIn docidsIn
maxPassagesIn snippets fieldsIn must not be empty ? invalid number of maxPassagesIn ? java/util/TreeSet ?
? . ? createNormalizedWeight r(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Z)Lcom/groupbyinc/flux/common/apache/lucene/search/Weight; ? ?
? ? 6com/groupbyinc/flux/common/apache/lucene/search/Weight ? extractTerms (Ljava/util/Set;)V ? ?
? ? getIndexReader >()Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader; ? ?
? ? :com/groupbyinc/flux/common/apache/lucene/index/IndexReader ?
getContext E()Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReaderContext; ? ?
? ? Acom/groupbyinc/flux/common/apache/lucene/index/IndexReaderContext ? leaves ()Ljava/util/List; ? ?
? ? java/lang/System ? arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V ? ?
? ? sort ([I)V ? ?
v ? o(Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter;[Ljava/lang/String;[I)V ' ?
? (II)V ? ?
? loadFieldValues k(Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;[Ljava/lang/String;[II)[[Ljava/lang/String; ? ?
? java/util/SortedSet java/util/List [[Ljava/lang/String; 3com/groupbyinc/flux/common/apache/lucene/index/Term '(Ljava/lang/String;Ljava/lang/String;)V '
9com/groupbyinc/flux/common/apache/lucene/util/UnicodeUtil BIG_TERM 8Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef; M(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;)V '
subSet ;(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/SortedSet; size ()I 6com/groupbyinc/flux/common/apache/lucene/util/BytesRef ? 9[Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;" bytes :()Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;$%
& : ;
( highlightField ?(Ljava/lang/String;[Ljava/lang/String;Ljava/text/BreakIterator;[Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;[ILjava/util/List;ILcom/groupbyinc/flux/common/apache/lucene/search/Query;)Ljava/util/Map;*+
, java/lang/Integer. valueOf (I)Ljava/lang/Integer;01
/2 term 5Lcom/groupbyinc/flux/common/apache/lucene/index/Term; j numPassages floor ceiling
fieldTerms LLjava/util/SortedSet; Ljava/util/SortedSet; terms termUpto fieldHighlights 6Ljava/util/Map; result
queryTerms
readerContext CLcom/groupbyinc/flux/common/apache/lucene/index/IndexReaderContext; TLjava/util/List; Ljava/util/List; contents
highlights 6Ljava/util/Map; [CJ getMultiValuedSeparator (Ljava/lang/String;)CLM
N ([Ljava/lang/String;[CI)V 'P
Q G(ILcom/groupbyinc/flux/common/apache/lucene/index/StoredFieldVisitor;)V ?S
?T (I)Ljava/lang/String; ?V
W
e ? resetZ (
[ valueSeparators visitor qLcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PostingsHighlighter$LimitedStoredFieldVisitor; getIndexAnalyzer P(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/analysis/Analyzer; J K
b java/lang/NullPointerExceptiond PassageFormatter cannot be nullf
e 6 Rcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/PassageFormatteri`a
k Mcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomatonm Wcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/MultiTermHighlightingo extractAutomata ?(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Ljava/lang/String;)[Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton;qr
ps :com/groupbyinc/flux/common/apache/lucene/analysis/Analyzeru P[Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton;w >[Lcom/groupbyinc/flux/common/apache/lucene/index/PostingsEnum;y 8com/groupbyinc/flux/common/apache/lucene/index/TermsEnum{ length}
e~ setText? 5
C? 9com/groupbyinc/flux/common/apache/lucene/index/ReaderUtil? subIndex (ILjava/util/List;)I??
?? (I)Ljava/lang/Object; j?? @com/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext? reader =()Lcom/groupbyinc/flux/common/apache/lucene/index/LeafReader;??
?? % & ? java/lang/AssertionError?
? . 9com/groupbyinc/flux/common/apache/lucene/index/LeafReader? J(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/index/Terms;=?
?? 4com/groupbyinc/flux/common/apache/lucene/index/Terms?
hasOffsets? ?
?? java/lang/StringBuilder?
? . field '? append -(Ljava/lang/String;)Ljava/lang/StringBuilder;??
?? /' was indexed without offsets, cannot highlight?
? ? <()Lcom/groupbyinc/flux/common/apache/lucene/index/TermsEnum; ??
?? ;com/groupbyinc/flux/common/apache/lucene/index/PostingsEnum? tokenStream e(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/analysis/TokenStream;??
v? getDocsEnum ?(Lcom/groupbyinc/flux/common/apache/lucene/analysis/TokenStream;[Lcom/groupbyinc/flux/common/apache/lucene/util/automaton/CharacterRunAutomaton;)Lcom/groupbyinc/flux/common/apache/lucene/index/PostingsEnum;??
p? docBase? ?? advance (I)I??
?? highlightDoc-(Ljava/lang/String;[Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;ILjava/text/BreakIterator;ILcom/groupbyinc/flux/common/apache/lucene/index/TermsEnum;[Lcom/groupbyinc/flux/common/apache/lucene/index/PostingsEnum;I)[Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/Passage;??
? getEmptyHighlight z(Ljava/lang/String;Ljava/text/BreakIterator;I)[Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/Passage;??
? L[Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/Passage;? format r([Lcom/groupbyinc/flux/common/apache/lucene/search/postingshighlight/Passage;Ljava/lang/String;)Ljava/lang/Object;??
j? newTerms t 6Lcom/groupbyinc/flux/common/apache/lucene/index/Terms; dp content leaf
subContext BLcom/groupbyinc/flux/common/apache/lucene/index/LeafReaderContext; r ;Lcom/groupbyinc/flux/common/apache/lucene/index/LeafReader; passages bi Ljava/text/BreakIterator; fieldFormatter analyzer