com.groupbyinc.flux.search.fetch.subphase.highlight.UnifiedHighlighter.class Maven / Gradle / Ivy
???? 4b Fcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter java/lang/Object ?com/groupbyinc/flux/search/fetch/subphase/highlight/Highlighter UnifiedHighlighter.java Hcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter$1 ]com/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter$MapperHighlighterEntry
MapperHighlighterEntry Wcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter$HighlighterEntry
HighlighterEntry Zcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/UnifiedHighlighter$OffsetSource Mcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/UnifiedHighlighter OffsetSource Pcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$Field Jcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight Field 9com/groupbyinc/flux/search/fetch/FetchSubPhase$HitContext .com/groupbyinc/flux/search/fetch/FetchSubPhase
HitContext Wcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$FieldOptions FieldOptions Xcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlightBuilder$BoundaryScannerType " Dcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlightBuilder $ BoundaryScannerType Kcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlightUtils$Encoders ' Bcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlightUtils ) Encoders %java/lang/invoke/MethodHandles$Lookup , java/lang/invoke/MethodHandles . Lookup CACHE_KEY Ljava/lang/String; highlight-unified 3 ()V 5 6
7 this HLcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter; canHighlight 1(Lcom/groupbyinc/flux/index/mapper/FieldMapper;)Z fieldMapper .Lcom/groupbyinc/flux/index/mapper/FieldMapper; highlight ?(Lcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlighterContext;)Lcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlightField; java/io/IOException A Fcom/groupbyinc/flux/search/fetch/subphase/highlight/HighlighterContext C mapper E > D F field RLcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$Field; H I D J context 3Lcom/groupbyinc/flux/search/internal/SearchContext; L M D N
hitContext ;Lcom/groupbyinc/flux/search/fetch/FetchSubPhase$HitContext; P Q D R cache ()Ljava/util/Map; T U
V
java/util/Map X containsKey (Ljava/lang/Object;)Z Z [ Y \ M(Lcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter$1;)V 5 ^
_ put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; a b Y c ,com/groupbyinc/flux/index/mapper/FieldMapper e 1com/groupbyinc/flux/search/internal/SearchContext g get &(Ljava/lang/Object;)Ljava/lang/Object; i j Y k mappers Ljava/util/Map; m n o fieldOptions [()Lcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$FieldOptions; q r
s encoder ()Ljava/lang/String; u v
w html y java/lang/String { equals } [
| ~ HTML CLcom/groupbyinc/flux/common/apache/lucene/search/highlight/Encoder; ? ? ( ? DEFAULT ? ? ( ? Acom/groupbyinc/flux/common/apache/lucene/search/highlight/Encoder ? Qcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/CustomPassageFormatter ? preTags ()[Ljava/lang/String; ? ?
? postTags ? ?
? j(Ljava/lang/String;Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/highlight/Encoder;)V 5 ?
? ? ?(Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/CustomPassageFormatter;Lcom/groupbyinc/flux/search/fetch/subphase/highlight/UnifiedHighlighter$1;)V 5 ?
? java/util/ArrayList ?
? 7
mapperService 2()Lcom/groupbyinc/flux/index/mapper/MapperService; ? ?
h ? hit (()Lcom/groupbyinc/flux/search/SearchHit; ? ?
? $com/groupbyinc/flux/search/SearchHit ? getType ? v
? ? .com/groupbyinc/flux/index/mapper/MapperService ? documentMapper E(Ljava/lang/String;)Lcom/groupbyinc/flux/index/mapper/DocumentMapper; ? ?
? ? /com/groupbyinc/flux/index/mapper/DocumentMapper ? 9()Lcom/groupbyinc/flux/index/mapper/DocumentFieldMappers; m ?
? ? 5com/groupbyinc/flux/index/mapper/DocumentFieldMappers ?
indexAnalyzer >()Lcom/groupbyinc/flux/common/apache/lucene/analysis/Analyzer; ? ?
? ? loadFieldValues (Lcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$Field;Lcom/groupbyinc/flux/index/mapper/FieldMapper;Lcom/groupbyinc/flux/search/internal/SearchContext;Lcom/groupbyinc/flux/search/fetch/FetchSubPhase$HitContext;)Ljava/util/List; ? ?
* ? java/util/List ? stream ()Ljava/util/stream/Stream; ? ? ? ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? j lambda$highlight$0 T(Lcom/groupbyinc/flux/index/mapper/FieldMapper;Ljava/lang/Object;)Ljava/lang/Object; ? ?
? ? apply M(Lcom/groupbyinc/flux/index/mapper/FieldMapper;)Ljava/util/function/Function; ? ? ? java/util/stream/Stream ? map 8(Ljava/util/function/Function;)Ljava/util/stream/Stream; ? ? ? ? java/util/stream/Collectors ? toList ()Ljava/util/stream/Collector; ? ?
? ? collect 0(Ljava/util/stream/Collector;)Ljava/lang/Object; ? ? ? ? =com/groupbyinc/flux/common/apache/lucene/search/IndexSearcher ? reader =()Lcom/groupbyinc/flux/common/apache/lucene/index/LeafReader; ? ?
? ?(Lcom/groupbyinc/flux/common/apache/lucene/index/IndexReader;)V 5 ?
? ? mergeFieldValues %(Ljava/util/List;C)Ljava/lang/String; ? ?
? fieldType 4()Lcom/groupbyinc/flux/index/mapper/MappedFieldType; ? ?
f ? getOffsetSource ?(Lcom/groupbyinc/flux/index/mapper/MappedFieldType;)Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/UnifiedHighlighter$OffsetSource; ? ?
? numberOfFragments ()I ? ?
? Wcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/CustomSeparatorBreakIterator ? (C)V 5 ?
? Scom/groupbyinc/flux/common/apache/lucene/search/uhighlight/CustomUnifiedHighlighter passageFormatter SLcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/CustomPassageFormatter; boundaryScannerLocale ()Ljava/util/Locale;
noMatchSize ?
e(Lcom/groupbyinc/flux/common/apache/lucene/search/IndexSearcher;Lcom/groupbyinc/flux/common/apache/lucene/analysis/Analyzer;Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/UnifiedHighlighter$OffsetSource;Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/PassageFormatter;Ljava/util/Locale;Ljava/text/BreakIterator;Ljava/lang/String;I)V 5
size ? ? :com/groupbyinc/flux/common/apache/lucene/analysis/Analyzer getBreakIterator m(Lcom/groupbyinc/flux/search/fetch/subphase/highlight/SearchContextHighlight$Field;)Ljava/text/BreakIterator;
requireFieldMatch ()Ljava/lang/Boolean;
java/lang/Boolean booleanValue ()Z!"
# fieldName% 2 D& [ lambda$highlight$1 '(Ljava/lang/String;Ljava/lang/String;)Z)*
+, (Ljava/lang/String;)Z. test 2(Ljava/lang/String;)Ljava/util/function/Predicate;01 2 setFieldMatcher !(Ljava/util/function/Predicate;)V45
6 lambda$highlight$28.
9: ()Ljava/util/function/Predicate;0< = query 7Lcom/groupbyinc/flux/common/apache/lucene/search/Query;?@ DA docIdC ?
D highlightField ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;II)[Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/Snippet;FG
H E[Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/Snippet;J Bcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/SnippetL getTextN v
MO "com/groupbyinc/flux/common/StringsQ hasTextS.
RT addV [ ?W =com/groupbyinc/flux/search/fetch/FetchPhaseExecutionExceptionY java/lang/StringBuilder[
\ 7 Failed to highlight field [^ append -(Ljava/lang/String;)Ljava/lang/StringBuilder;`a
\b ]d toStringf v
\g ](Lcom/groupbyinc/flux/search/internal/SearchContext;Ljava/lang/String;Ljava/lang/Throwable;)V 5i
Zj filterSnippets #(Ljava/util/List;I)Ljava/util/List;lm
n scoreOrderedp
q '(Ljava/lang/Object;Ljava/lang/Object;)Is lambda$highlight$3 ?(Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/Snippet;Lcom/groupbyinc/flux/common/apache/lucene/search/uhighlight/Snippet;)Iuv
wxv compare ()Ljava/util/Comparator;{| }