com.groupbyinc.flux.search.suggest.completion.context.ContextMappings.class Maven / Gradle / Ivy
???? 4? Ecom/groupbyinc/flux/search/suggest/completion/context/ContextMappings java/lang/Object .com/groupbyinc/flux/common/xcontent/ToXContent ContextMappings.java Gcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings$1 Wcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings$TypedContextField
TypedContextField 6com/groupbyinc/flux/index/mapper/ParseContext$Document
-com/groupbyinc/flux/index/mapper/ParseContext Document Ycom/groupbyinc/flux/search/suggest/completion/context/ContextMapping$InternalQueryContext Dcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping InternalQueryContext 5com/groupbyinc/flux/common/xcontent/ToXContent$Params Params Icom/groupbyinc/flux/search/suggest/completion/context/ContextMapping$Type Type contextMappings Ljava/util/List; XLjava/util/List; contextNameMap Ljava/util/Map; iLjava/util/Map; $assertionsDisabled Z (Ljava/util/List;)V ()V % '
( java/util/List * size ()I , - + . 'java/lang/UnsupportedOperationException 0 java/lang/StringBuilder 2
3 ( /Maximum of 10 context types are supported was: 5 append -(Ljava/lang/String;)Ljava/lang/StringBuilder; 7 8
3 9 (I)Ljava/lang/StringBuilder; 7 ;
3 < toString ()Ljava/lang/String; > ?
3 @ (Ljava/lang/String;)V % B
1 C E java/util/HashMap G (I)V % I
H J ! L iterator ()Ljava/util/Iterator; N O + P java/util/Iterator R hasNext ()Z T U S V next ()Ljava/lang/Object; X Y S Z name \ ?
]
java/util/Map _ put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; a b ` c mapping FLcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping; this GLcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings; get Z(Ljava/lang/String;)Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping; &(Ljava/lang/Object;)Ljava/lang/Object; i k ` l java/util/ArrayList n keySet ()Ljava/util/Set; p q ` r (Ljava/util/Collection;)V % t
o u java/util/Collections w sort y &
x z "java/lang/IllegalArgumentException | Unknown context name [ ~ ], must be one of ?
@
} C keys $Ljava/util/List; Ljava/lang/String; contextMapping addField o(Lcom/groupbyinc/flux/index/mapper/ParseContext$Document;Ljava/lang/String;Ljava/lang/String;ILjava/util/Map;)V ?(Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings;Ljava/lang/String;Ljava/lang/String;ILjava/util/Map;Lcom/groupbyinc/flux/index/mapper/ParseContext$Document;)V % ?
? add B(Lcom/groupbyinc/flux/common/apache/lucene/index/IndexableField;)V ? ?
? document 8Lcom/groupbyinc/flux/index/mapper/ParseContext$Document; input weight I contexts LLjava/util/Map;>; toContextQuery ?(Lcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/CompletionQuery;Ljava/util/Map;)Lcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/ContextQuery; Mcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/ContextQuery ? U(Lcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/CompletionQuery;)V % ?
? ? isEmpty ? U ` ? =com/groupbyinc/flux/common/apache/lucene/util/CharsRefBuilder ?
? ( grow ? I
? ? setCharAt (IC)V ? ?
? ? setLength ? I
? ? (I)Ljava/lang/Object; i ? + ? context ? ? ? Y(Ljava/lang/CharSequence;)Lcom/groupbyinc/flux/common/apache/lucene/util/CharsRefBuilder; 7 ?
? ?
toCharsRef :()Lcom/groupbyinc/flux/common/apache/lucene/util/CharsRef; ? ?
? ? boost ? ? ? isPrefix ? $ ? Pcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/CompletionQuery ? 6com/groupbyinc/flux/common/apache/lucene/util/CharsRef ?
addContext (Ljava/lang/CharSequence;FZ)V ? ?
? ? [Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping$InternalQueryContext; internalQueryContext mLjava/util/List; typeId scratch ?Lcom/groupbyinc/flux/common/apache/lucene/util/CharsRefBuilder; query RLcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/CompletionQuery;
queryContexts ?Ljava/util/Map;>; typedContextQuery OLcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/ContextQuery; getNamedContexts !(Ljava/util/List;)Ljava/util/Map; java/lang/CharSequence ? charAt (I)C ? ? ? ? # $ ? java/lang/AssertionError ? !Returned context has invalid type ? (Ljava/lang/Object;)V % ?
? ?
java/util/Set ? java/util/HashSet ?
? ( length ? - ? ? subSequence (II)Ljava/lang/CharSequence; ? ? ? ? (Ljava/lang/Object;)Z ? ? ? ? contextEntries )Ljava/util/Set; Ljava/util/Set; typedContext Ljava/lang/CharSequence; *Ljava/util/List;
contextMap load x(Ljava/lang/Object;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings; /com/groupbyinc/flux/ElasticsearchParseException ?
o ( t(Ljava/util/Map;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping; ?
+ ? %expected at least one context mapping ((Ljava/lang/String;[Ljava/lang/Object;)V %
singletonList $(Ljava/lang/Object;)Ljava/util/List;
x
.expected a list or an entry of context mapping % &
contextConfig Ljava/lang/Object; configurations $Ljava/util/List;
configuration indexVersionCreated Lcom/groupbyinc/flux/Version; \ extractRequiredValue 5(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/String;
type R$SwitchMap$org$elasticsearch$search$suggest$completion$context$ContextMapping$Type [I!" #
fromString _(Ljava/lang/String;)Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping$Type;%&
' ordinal) -
* java/lang/String, Lcom/groupbyinc/flux/search/suggest/completion/context/CategoryContextMapping. q(Ljava/lang/String;Ljava/util/Map;)Lcom/groupbyinc/flux/search/suggest/completion/context/CategoryContextMapping; ?0
/1 Gcom/groupbyinc/flux/search/suggest/completion/context/GeoContextMapping3 l(Ljava/lang/String;Ljava/util/Map;)Lcom/groupbyinc/flux/search/suggest/completion/context/GeoContextMapping; ?5
46 unknown context type[8 ]: 5com/groupbyinc/flux/index/mapper/DocumentMapperParser< checkNoRemainingFields A(Ljava/lang/String;Ljava/util/Map;Lcom/groupbyinc/flux/Version;)V>?
=@ 5Ljava/util/Map; missing [C ] in context mappingE removeG k `H paramName
paramValue
toXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; java/io/IOExceptionN 3com/groupbyinc/flux/common/xcontent/XContentBuilderP startObject 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;RS
QTLM
V endObjectXS
QY builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; params 7Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params; hashCode java/util/Objects` hash ([Ljava/lang/Object;)Ibc
ad equalsf ? +g obj other
access$000 Y(Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMappings;)Ljava/util/List; x0 java/lang/Classo desiredAssertionStatusq U
pr Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable
StackMapTable [(Ljava/util/List;)V ?(Lcom/groupbyinc/flux/index/mapper/ParseContext$Document;Ljava/lang/String;Ljava/lang/String;ILjava/util/Map;>;)V3(Lcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/CompletionQuery;Ljava/util/Map;>;)Lcom/groupbyinc/flux/common/apache/lucene/search/suggest/document/ContextQuery; x(Ljava/util/List;)Ljava/util/Map;>;
Exceptions ?(Ljava/util/Map;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/search/suggest/completion/context/ContextMapping; [(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/String;
SourceFile InnerClasses ! t ! t " # $ % &