@@ -796,7 +796,7 @@ data Filter = AndFilter [Filter] Cache
796 | IdentityFilter
796 | IdentityFilter
797 | BoolFilter BoolMatch
797 | BoolFilter BoolMatch
798 | ExistsFilter FieldName -- always cached
798 | ExistsFilter FieldName -- always cached
799− | GeoBoundingBoxFilter GeoBoundingBoxConstraint GeoFilterType
799+ | GeoBoundingBoxFilter GeoBoundingBoxConstraint
800 | GeoDistanceFilter GeoPoint Distance DistanceType OptimizeBbox Cache
800 | GeoDistanceFilter GeoPoint Distance DistanceType OptimizeBbox Cache
801 | GeoDistanceRangeFilter GeoPoint DistanceRange
801 | GeoDistanceRangeFilter GeoPoint DistanceRange
802 | GeoPolygonFilter FieldName [LatLon]
802 | GeoPolygonFilter FieldName [LatLon]
@@ -880,6 +880,7 @@ data GeoBoundingBoxConstraint =
880 GeoBoundingBoxConstraint { geoBBField :: FieldName
880 GeoBoundingBoxConstraint { geoBBField :: FieldName
881 , constraintBox :: GeoBoundingBox
881 , constraintBox :: GeoBoundingBox
882 , bbConstraintcache :: Cache
882 , bbConstraintcache :: Cache
883+ , geoType :: GeoFilterType
883 } deriving (Eq, Show)
884 } deriving (Eq, Show)
885data GeoPoint =
886data GeoPoint =
@@ -977,9 +978,8 @@ instance ToJSON Filter where
977 toJSON (BoolFilter boolMatch) =
978 toJSON (BoolFilter boolMatch) =
978 object ["bool" .= toJSON boolMatch]
979 object ["bool" .= toJSON boolMatch]
980− toJSON (GeoBoundingBoxFilter bbConstraint filterType) =
981+ toJSON (GeoBoundingBoxFilter bbConstraint) =
981− object ["geo_bounding_box" .= toJSON bbConstraint
982+ object ["geo_bounding_box" .= toJSON bbConstraint]
982− , "type" .= toJSON filterType]
984 toJSON (GeoDistanceFilter (GeoPoint (FieldName distanceGeoField) geoDistLatLon)
984 toJSON (GeoDistanceFilter (GeoPoint (FieldName distanceGeoField) geoDistLatLon)
985 distance distanceType optimizeBbox cache) =
985 distance distanceType optimizeBbox cache) =
@@ -1283,7 +1283,7 @@ instance ToJSON MoreLikeThisQuery where
1283 mtf mqt stopwords mindf maxdf
1283 mtf mqt stopwords mindf maxdf
1284 minwl maxwl boostTerms boost analyzer) =
1284 minwl maxwl boostTerms boost analyzer) =
1285 omitNulls base
1285 omitNulls base
1286− where base = [ "like_text" .= toJSON text
1286+ where base = [ "like_text" .= toJSON text
1287 , "fields" .= fields
1287 , "fields" .= fields
1288 , "percent_terms_to_match" .= percent
1288 , "percent_terms_to_match" .= percent
1289 , "min_term_freq" .= mtf
1289 , "min_term_freq" .= mtf
@@ -1617,9 +1617,10 @@ instance ToJSON OptimizeBbox where
1618instance ToJSON GeoBoundingBoxConstraint where
1618instance ToJSON GeoBoundingBoxConstraint where
1619 toJSON (GeoBoundingBoxConstraint
1619 toJSON (GeoBoundingBoxConstraint
1620− (FieldName gbbcGeoBBField) gbbcConstraintBox cache) =
1620+ (FieldName gbbcGeoBBField) gbbcConstraintBox cache type') =
1621 object [gbbcGeoBBField .= toJSON gbbcConstraintBox
1621 object [gbbcGeoBBField .= toJSON gbbcConstraintBox
1622− , "_cache" .= cache]
1622+ , "_cache" .= cache
1625instance ToJSON GeoFilterType where
1626instance ToJSON GeoFilterType where