com.groupbyinc.flux.index.query.GeoDistanceQueryBuilder.class Maven / Gradle / Ivy
???? 4W 7com/groupbyinc/flux/index/query/GeoDistanceQueryBuilder qLcom/groupbyinc/flux/index/query/AbstractQueryBuilder; 4com/groupbyinc/flux/index/query/AbstractQueryBuilder GeoDistanceQueryBuilder.java 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 Fcom/groupbyinc/flux/index/mapper/GeoPointFieldMapper$GeoPointFieldType 4com/groupbyinc/flux/index/mapper/GeoPointFieldMapper GeoPointFieldType NAME Ljava/lang/String; geo_distance DEFAULT_DISTANCE_UNIT .Lcom/groupbyinc/flux/common/unit/DistanceUnit; DEFAULT_GEO_DISTANCE ,Lcom/groupbyinc/flux/common/geo/GeoDistance; DEFAULT_IGNORE_UNMAPPED Z VALIDATION_METHOD_FIELD 'Lcom/groupbyinc/flux/common/ParseField; DISTANCE_TYPE_FIELD
UNIT_FIELD DISTANCE_FIELD IGNORE_UNMAPPED_FIELD fieldName distance D center )Lcom/groupbyinc/flux/common/geo/GeoPoint; geoDistance validationMethod 5Lcom/groupbyinc/flux/index/query/GeoValidationMethod; ignoreUnmapped (Ljava/lang/String;)V ()V 0 2
3 'com/groupbyinc/flux/common/geo/GeoPoint 5? (DD)V 0 9
6 : * + < *com/groupbyinc/flux/common/geo/GeoDistance > ARC @ ? A , C 3com/groupbyinc/flux/index/query/GeoValidationMethod E DEFAULT G . F H - . J / L "com/groupbyinc/flux/common/Strings N isEmpty (Ljava/lang/CharSequence;)Z P Q
O R "java/lang/IllegalArgumentException T #fieldName must not be null or empty V 0 1
U X java/lang/String Z ' \ this 9Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; 5(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)V java/io/IOException a 0 `
c 0com/groupbyinc/flux/common/io/stream/StreamInput e
readString ()Ljava/lang/String; g h
f i
readDouble ()D k l
f m ( ) o readFromStream i(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)Lcom/groupbyinc/flux/index/query/GeoValidationMethod; q r
F s readGeoPoint +()Lcom/groupbyinc/flux/common/geo/GeoPoint; u v
f w `(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)Lcom/groupbyinc/flux/common/geo/GeoDistance; q y
? z readBoolean ()Z | }
f ~ in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; doWriteTo 6(Lcom/groupbyinc/flux/common/io/stream/StreamOutput;)V 1com/groupbyinc/flux/common/io/stream/StreamOutput ? writeString ? 1
? ? writeDouble (D)V ? ?
? ? writeTo ? ?
F ?
writeGeoPoint ,(Lcom/groupbyinc/flux/common/geo/GeoPoint;)V ? ?
? ?
? ? writeBoolean (Z)V ? ?
? ? out 3Lcom/groupbyinc/flux/common/io/stream/StreamOutput; point d(Lcom/groupbyinc/flux/common/geo/GeoPoint;)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; center point must not be null ? =(DD)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; lat lon M(Ljava/lang/String;)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; ,com/groupbyinc/flux/common/unit/DistanceUnit ? G ? ? {(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/DistanceUnit;)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; ( ?
? "distance must not be null or empty ? distance unit must not be null ? parse q(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/DistanceUnit;Lcom/groupbyinc/flux/common/unit/DistanceUnit;)D ? ?
? ? "distance must be greater than zero ? unit newDistance j(DLcom/groupbyinc/flux/common/unit/DistanceUnit;)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; java/lang/Double ? toString (D)Ljava/lang/String; ? ?
? ? geohash !geohash must not be null or empty ? resetFromGeoHash =(Ljava/lang/String;)Lcom/groupbyinc/flux/common/geo/GeoPoint; ? ?
6 ? g(Lcom/groupbyinc/flux/common/geo/GeoDistance;)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; geoDistance must not be null ? .()Lcom/groupbyinc/flux/common/geo/GeoDistance; setValidationMethod 8(Lcom/groupbyinc/flux/index/query/GeoValidationMethod;)V method getValidationMethod 7()Lcom/groupbyinc/flux/index/query/GeoValidationMethod; <(Z)Lcom/groupbyinc/flux/index/query/GeoDistanceQueryBuilder; doToQuery l(Lcom/groupbyinc/flux/index/query/QueryShardContext;)Lcom/groupbyinc/flux/common/apache/lucene/search/Query; 1com/groupbyinc/flux/index/query/QueryShardContext ? fieldMapper F(Ljava/lang/String;)Lcom/groupbyinc/flux/index/mapper/MappedFieldType; ? ?
? ? @com/groupbyinc/flux/common/apache/lucene/search/MatchNoDocsQuery ?
? 3 0com/groupbyinc/flux/index/mapper/MappedFieldType ? 3com/groupbyinc/flux/index/query/QueryShardException ? java/lang/StringBuilder ?
? 3 failed to find geo_point field [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ] ? ? h
? ? java/lang/Object ? [(Lcom/groupbyinc/flux/index/query/QueryShardContext;Ljava/lang/String;[Ljava/lang/Object;)V 0 ?
? ? field [ ? ] is not a geo_point field ? checkLatLon <()Lcom/groupbyinc/flux/index/query/QueryValidationException; ? ?
? ,couldn't validate latitude/ longitude values ? p(Lcom/groupbyinc/flux/index/query/QueryShardContext;Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V 0 ?
? ? 8com/groupbyinc/flux/index/query/QueryValidationException ? isCoerce 8(Lcom/groupbyinc/flux/index/query/GeoValidationMethod;)Z ? ?
F 'com/groupbyinc/flux/common/geo/GeoUtils normalizePoint .(Lcom/groupbyinc/flux/common/geo/GeoPoint;ZZ)V
name h
? ? l
6 ? l
6
=com/groupbyinc/flux/common/apache/lucene/document/LatLonPoint newDistanceQuery N(Ljava/lang/String;DDD)Lcom/groupbyinc/flux/common/apache/lucene/search/Query;
hasDocValues }
? Fcom/groupbyinc/flux/common/apache/lucene/document/LatLonDocValuesField newSlowDistanceQuery
Ecom/groupbyinc/flux/common/apache/lucene/search/IndexOrDocValuesQuery q(Lcom/groupbyinc/flux/common/apache/lucene/search/Query;Lcom/groupbyinc/flux/common/apache/lucene/search/Query;)V 0
5com/groupbyinc/flux/common/apache/lucene/search/Query" dvQuery 7Lcom/groupbyinc/flux/common/apache/lucene/search/Query; shardContext 3Lcom/groupbyinc/flux/index/query/QueryShardContext; fieldType 2Lcom/groupbyinc/flux/index/mapper/MappedFieldType; exception :Lcom/groupbyinc/flux/index/query/QueryValidationException; query
doXContent o(Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;Lcom/groupbyinc/flux/common/xcontent/ToXContent$Params;)V 3com/groupbyinc/flux/common/xcontent/XContentBuilder/ startObject I(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;12
03
startArray52
06 value 8(D)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;89
0: endArray 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;<=
0> % " @ %com/groupbyinc/flux/common/ParseFieldB getPreferredNameD h
CE field J(Ljava/lang/String;D)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;GH
0I # " K
? java/util/LocaleN ROOT Ljava/util/Locale;PQ OR toLowerCase &(Ljava/util/Locale;)Ljava/lang/String;TU
[V [(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;GX
0Y ! " [ [(Ljava/lang/String;Ljava/lang/Object;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;G]
0^ &