com.groupbyinc.flux.search.suggest.completion2x.context.GeolocationContextMapping.class Maven / Gradle / Ivy
???? 4? Qcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping Fcom/groupbyinc/flux/search/suggest/completion2x/context/ContextMapping GeolocationContextMapping.java Scom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$1 Zcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$GeoQuery GeoQuery [com/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$GeoConfig GeoConfig Ycom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder Builder 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 Tcom/groupbyinc/flux/search/suggest/completion2x/context/ContextMapping$ContextConfig
ContextConfig Scom/groupbyinc/flux/search/suggest/completion2x/context/ContextMapping$ContextQuery ContextQuery =com/groupbyinc/flux/common/xcontent/XContentParser$NumberType !
NumberType TYPE Ljava/lang/String; geo & FIELD_PRECISION precision ) FIELD_NEIGHBORS neighbors , FIELD_FIELDNAME path / defaultLocations Ljava/util/Collection; *Ljava/util/Collection; [I Z fieldName
defaultConfig ]Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$GeoConfig; @(Ljava/lang/String;[IZLjava/util/Collection;Ljava/lang/String;)V '(Ljava/lang/String;Ljava/lang/String;)V 9 ;
< ) 4 > , 5 @ 1 2 B 6 % D l(Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping;Ljava/util/Collection;)V 9 F
G 7 8 I this SLcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping; name load v(Ljava/lang/String;Ljava/util/Map;)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping;
java/util/Map P containsKey (Ljava/lang/Object;)Z R S Q T /com/groupbyinc/flux/ElasticsearchParseException V field [precision] is missing X java/lang/Object Z ((Ljava/lang/String;[Ljava/lang/Object;)V 9 \
W ] (Ljava/lang/String;)V 9 _
` get &(Ljava/lang/Object;)Ljava/lang/Object; b c Q d java/lang/Integer f intValue ()I h i
g j ^(I)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; ) l
m remove o c Q p java/lang/Long r longValue ()J t u
s v ^(D)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; ) x
y java/lang/Double { doubleValue ()D } ~
| java/lang/Float ?
floatValue ()F ? ?
? ? java/lang/Iterable ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? toString ()Ljava/lang/String; ? ?
[ ? o(Ljava/lang/String;)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; ) ?
? java/lang/Boolean ? booleanValue ? ?
? ? ^(Z)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; , ?
? default ? addDefaultLocation ? ?
? java/lang/String ? lat ? 7field [{}] map must have field lat and a valid latitude ? lon ? 8field [{}] map must have field lon and a valid longitude ? valueOf &(Ljava/lang/String;)Ljava/lang/Double; ? ?
| ? _(DD)Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; ? ?
? )field [{}] must be of type string or list ? field ? ?
? build U()Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping; ? ?
? Ljava/lang/Object; location latlonMap 5Ljava/util/Map; Ljava/util/Map; configPrecision configNeighbors def config builder [Lcom/groupbyinc/flux/search/suggest/completion2x/context/GeolocationContextMapping$Builder; toInnerXContent ?(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; java/io/IOException ? 3com/groupbyinc/flux/common/xcontent/XContentBuilder ? array K(Ljava/lang/String;[I)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? J(Ljava/lang/String;Z)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ?
startArray I(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? java/util/Collection ? ? ? value ? ?
? ? endArray 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? [(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
? ? defaultLocation 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; params 7Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params; parseSinglePointOrList L(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Ljava/util/Collection; currentToken <()Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; ? ? ? START_ARRAY :Lcom/groupbyinc/flux/common/xcontent/XContentParser$Token; ? ? ? nextToken ? ? ? VALUE_NUMBER ? ? END_ARRAY ? +com/groupbyinc/flux/common/geo/GeoHashUtils stringEncode (DD)Ljava/lang/String;
java/util/Collections singleton #(Ljava/lang/Object;)Ljava/util/Set;
only two values expected latitue must be a numeric value java/util/ArrayList ()V 9
'com/groupbyinc/flux/common/geo/GeoUtils
parseGeoPoint _(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/common/geo/GeoPoint;
'com/groupbyinc/flux/common/geo/GeoPoint! geohash# ?
"$ add&