com.groupbyinc.flux.search.suggest.SuggestBuilder.class Maven / Gradle / Ivy
???? 4b 1com/groupbyinc/flux/search/suggest/SuggestBuilder 4com/groupbyinc/flux/action/support/ToXContentToBytes .com/groupbyinc/flux/common/io/stream/Writeable 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 1 0com/groupbyinc/flux/common/io/stream/StreamInput 3 readOptionalString ()Ljava/lang/String; 5 6
4 7 9 readVInt ()I ; <
4 =
readString ? 6
4 @ 4com/groupbyinc/flux/search/suggest/SuggestionBuilder B readNamedWriteable H(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/io/stream/NamedWriteable; D E
4 F put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; H I J 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 S writeOptionalString (Ljava/lang/String;)V U V
T W P < Y writeVInt (I)V [ \
T ] entrySet ()Ljava/util/Set; _ ` a
java/util/Set c iterator ()Ljava/util/Iterator; e f d g java/util/Iterator i hasNext ()Z k l j m next ()Ljava/lang/Object; o p j q getKey s p t java/lang/String v writeString x V
T y getValue { p | 3com/groupbyinc/flux/common/io/stream/NamedWriteable ~ writeNamedWriteable 8(Lcom/groupbyinc/flux/common/io/stream/NamedWriteable;)V ? ?
T ?
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 ? 6
? ? % V
? ? 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; ? ?
? ? ? ?
C ? 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 ? 6 ? isValue ? l
? ? %com/groupbyinc/flux/common/ParseField ? match (Ljava/lang/String;)Z ? ?
? ? ? 6 ? ? ?
? [suggest] does not support [ ? suggestion must have name ? l(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/search/suggest/SuggestionBuilder; ? ?
C ? ?
+com/groupbyinc/flux/common/ParsingException getTokenLocation 8()Lcom/groupbyinc/flux/common/xcontent/XContentLocation; unexpected token [
-(Ljava/lang/Object;)Ljava/lang/StringBuilder; ?
?
] after [ java/lang/Object ^(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;
C 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;*+
), setText ;(Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;)V./
0 c(Ljava/lang/String;Lcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext;)V ?2
3 suggestionContext NLcom/groupbyinc/flux/search/suggest/SuggestionSearchContext$SuggestionContext; context 3Lcom/groupbyinc/flux/index/query/QueryShardContext; suggestionSearchContext