com.groupbyinc.flux.search.suggest.SuggestBuilder.class Maven / Gradle / Ivy
???? 4k 1com/groupbyinc/flux/search/suggest/SuggestBuilder java/lang/Object .com/groupbyinc/flux/common/io/stream/Writeable 4com/groupbyinc/flux/common/xcontent/ToXContentObject SuggestBuilder.java java/util/Map$Entry
java/util/Map Entry 5com/groupbyinc/flux/common/xcontent/ToXContent$Params .com/groupbyinc/flux/common/xcontent/ToXContent Params 8com/groupbyinc/flux/common/xcontent/XContentParser$Token 2com/groupbyinc/flux/common/xcontent/XContentParser Token Lcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext :com/groupbyinc/flux/search/suggest/SuggestionSearchContext SuggestionContext GLOBAL_TEXT_FIELD 'Lcom/groupbyinc/flux/common/ParseField;
globalText Ljava/lang/String; suggestions Ljava/util/Map; \Ljava/util/Map;>; $assertionsDisabled Z ()V ' (
) java/util/HashMap +
, ) " # . this 3Lcom/groupbyinc/flux/search/suggest/SuggestBuilder; 5(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)V java/io/IOException 3 0com/groupbyinc/flux/common/io/stream/StreamInput 5 readOptionalString ()Ljava/lang/String; 7 8
6 9 ! ; readVInt ()I = >
6 ?
readString A 8
6 B 4com/groupbyinc/flux/search/suggest/SuggestionBuilder D readNamedWriteable H(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/io/stream/NamedWriteable; F G
6 H put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; J K
L i I in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; size writeTo 6(Lcom/groupbyinc/flux/common/io/stream/StreamOutput;)V 1com/groupbyinc/flux/common/io/stream/StreamOutput U writeOptionalString (Ljava/lang/String;)V W X
V Y R >
[ writeVInt (I)V ] ^
V _ entrySet ()Ljava/util/Set; a b
c
java/util/Set e iterator ()Ljava/util/Iterator; g h f i java/util/Iterator k hasNext ()Z m n l o next ()Ljava/lang/Object; q r l s getKey u r v java/lang/String x writeString z X
V { getValue } r ~ 3com/groupbyinc/flux/common/io/stream/NamedWriteable ? writeNamedWriteable 8(Lcom/groupbyinc/flux/common/io/stream/NamedWriteable;)V ? ?
V ?
suggestion bLjava/util/Map$Entry;>; Ljava/util/Map$Entry; out 3Lcom/groupbyinc/flux/common/io/stream/StreamOutput;
setGlobalText G(Ljava/lang/String;)Lcom/groupbyinc/flux/search/suggest/SuggestBuilder; %Lcom/groupbyinc/flux/common/Nullable;
getGlobalText
addSuggestion }(Ljava/lang/String;Lcom/groupbyinc/flux/search/suggest/SuggestionBuilder;)Lcom/groupbyinc/flux/search/suggest/SuggestBuilder; every suggestion needs a name ? java/util/Objects ? requireNonNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; ? ?
? ? get &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
? "java/lang/IllegalArgumentException ? java/lang/StringBuilder ?
? ) ,already added another suggestion with name [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ] ? toString ? 8
? ? ' X
? ? name 9Lcom/groupbyinc/flux/search/suggest/SuggestionBuilder<*>; 6Lcom/groupbyinc/flux/search/suggest/SuggestionBuilder; getSuggestions ()Ljava/util/Map;
toXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; 3com/groupbyinc/flux/common/xcontent/XContentBuilder ? startObject 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? text ? field [(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? I(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? ? ?
E ? endObject ? ?
? ? builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; params 7Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params; fromXContent i(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/search/suggest/SuggestBuilder;
) currentToken <()Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; ? ? ? nextToken ? ? ? % & ? START_OBJECT :Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; ? ? ? java/lang/AssertionError ? $current token must be a start object ? (Ljava/lang/Object;)V ' ?
? ?
END_OBJECT ? ? ?
FIELD_NAME ? ? ? currentName ? 8 ? isValue ? n
? ? getDeprecationHandler :()Lcom/groupbyinc/flux/common/xcontent/DeprecationHandler; ? ? ? %com/groupbyinc/flux/common/ParseField ? match M(Ljava/lang/String;Lcom/groupbyinc/flux/common/xcontent/DeprecationHandler;)Z ? ?
? ? ? 8 ? ? ?
? [suggest] does not support [ suggestion must have name l(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/search/suggest/SuggestionBuilder; ?
E ? ?
+com/groupbyinc/flux/common/ParsingException
getTokenLocation 8()Lcom/groupbyinc/flux/common/xcontent/XContentLocation;
unexpected token [ -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ?
? ] after [ ^(Lcom/groupbyinc/flux/common/xcontent/XContentLocation;Ljava/lang/String;[Ljava/lang/Object;)V '
suggestionName parser 4Lcom/groupbyinc/flux/common/xcontent/XContentParser; suggestBuilder fieldName token build q(Lcom/groupbyinc/flux/index/query/QueryShardContext;)Lcom/groupbyinc/flux/search/suggest/SuggestionSearchContext;
) ?(Lcom/groupbyinc/flux/index/query/QueryShardContext;)Lcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext; #
E$ getText :()Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;&'
( #The required text option is missing* +com/groupbyinc/flux/common/lucene/BytesRefs,
toBytesRef L(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;./
-0 setText ;(Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;)V23
4 c(Ljava/lang/String;Lcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext;)V ?6
7 suggestionContext NLcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext; context 3Lcom/groupbyinc/flux/index/query/QueryShardContext; suggestionSearchContext