@@ -796,7 +796,7 @@ data Filter = AndFilter [Filter] Cache
796796 | IdentityFilter
797797 | BoolFilter BoolMatch
798798 | ExistsFilter FieldName -- always cached
799− | GeoBoundingBoxFilter GeoBoundingBoxConstraint GeoFilterType
799+ | GeoBoundingBoxFilter GeoBoundingBoxConstraint
800800 | GeoDistanceFilter GeoPoint Distance DistanceType OptimizeBbox Cache
801801 | GeoDistanceRangeFilter GeoPoint DistanceRange
802802 | GeoPolygonFilter FieldName [LatLon]
@@ -880,6 +880,7 @@ data GeoBoundingBoxConstraint =
880880 GeoBoundingBoxConstraint { geoBBField :: FieldName
881881 , constraintBox :: GeoBoundingBox
882882 , bbConstraintcache :: Cache
883+ , geoType :: GeoFilterType
883884 } deriving (Eq, Show)
884885
885886data GeoPoint =
@@ -977,9 +978,8 @@ instance ToJSON Filter where
977978 toJSON (BoolFilter boolMatch) =
978979 object ["bool" .= toJSON boolMatch]
979980
980− toJSON (GeoBoundingBoxFilter bbConstraint filterType) =
981− object ["geo_bounding_box" .= toJSON bbConstraint
982− , "type" .= toJSON filterType]
981+ toJSON (GeoBoundingBoxFilter bbConstraint) =
982+ object ["geo_bounding_box" .= toJSON bbConstraint]
983983
984984 toJSON (GeoDistanceFilter (GeoPoint (FieldName distanceGeoField) geoDistLatLon)
985985 distance distanceType optimizeBbox cache) =
@@ -1283,7 +1283,7 @@ instance ToJSON MoreLikeThisQuery where
12831283 mtf mqt stopwords mindf maxdf
12841284 minwl maxwl boostTerms boost analyzer) =
12851285 omitNulls base
1286− where base = [ "like_text" .= toJSON text
1286+ where base = [ "like_text" .= toJSON text
12871287 , "fields" .= fields
12881288 , "percent_terms_to_match" .= percent
12891289 , "min_term_freq" .= mtf
@@ -1617,9 +1617,10 @@ instance ToJSON OptimizeBbox where
16171617
16181618instance ToJSON GeoBoundingBoxConstraint where
16191619 toJSON (GeoBoundingBoxConstraint
1620− (FieldName gbbcGeoBBField) gbbcConstraintBox cache) =
1620+ (FieldName gbbcGeoBBField) gbbcConstraintBox cache type') =
16211621 object [gbbcGeoBBField .= toJSON gbbcConstraintBox
1622− , "_cache" .= cache]
1622+ , "_cache" .= cache
1623+ , "type" .= type']
16231624
16241625
16251626instance ToJSON GeoFilterType where