@@ -334,8 +334,8 @@ data Filter = AndFilter [Filter] (Maybe Cache)
334 | OrFilter [Filter] (Maybe Cache)
334 | OrFilter [Filter] (Maybe Cache)
335 | BoolFilter BoolMatch (Maybe Cache)
335 | BoolFilter BoolMatch (Maybe Cache)
336 | ExistsFilter FieldName -- always cached
336 | ExistsFilter FieldName -- always cached
337− | GeoBoundingBoxFilter FieldName GeoBoundingBoxConstraint GeoFilterType (Maybe Cache)
337+ | GeoBoundingBoxFilter GeoBoundingBoxConstraint GeoFilterType (Maybe Cache)
338− | GeoDistanceFilter FieldName LatLon Distance (Maybe Cache)
338+ | GeoDistanceFilter GeoConstraint Distance (Maybe Cache)
339 deriving (Show)
339 deriving (Show)
341-- I dunno.
341-- I dunno.
@@ -350,14 +350,19 @@ data BoolMatch = MustMatch Term
350data GeoFilterType = GeoFilterMemory | GeoFilterIndexed deriving (Show)
350data GeoFilterType = GeoFilterMemory | GeoFilterIndexed deriving (Show)
352data LatLon = LatLon { lat :: Double, lon :: Double } deriving (Show)
352data LatLon = LatLon { lat :: Double, lon :: Double } deriving (Show)
353−data GeoBoundingBox = { topLeft :: LatLon
353+data GeoBoundingBox =
354+ GeoBoundingBox { topLeft :: LatLon
354− , bottomRight :: LatLon } deriving (Show)
355+ , bottomRight :: LatLon } deriving (Show)
356data GeoBoundingBoxConstraint =
357data GeoBoundingBoxConstraint =
357− GeoBoundingBoxConstraint { geoField :: Text
358+ GeoBoundingBoxConstraint { geoField :: FieldName
358 , constraintBox :: GeoBoundingBox
359 , constraintBox :: GeoBoundingBox
359 } deriving (Show)
360 } deriving (Show)
363+ GeoConstraint { geoField :: FieldName
364+ , latLon :: LatLon } deriving (Show)
361data DistanceUnits = Miles
366data DistanceUnits = Miles
@@ -373,8 +378,10 @@ data DistanceType = Arc | SloppyArc | Plane deriving (Show)
373-- geo_point?
378-- geo_point?
374data OptimizeBbox = GeoFilterType | NoOptimizeBbox deriving (Show)
379data OptimizeBbox = GeoFilterType | NoOptimizeBbox deriving (Show)
376−data Distance = { coefficient :: Double
382+ Distance { coefficient :: Double
377− , unit :: DistanceUnits } deriving (Show)
383+ , unit :: DistanceUnits } deriving (Show)
378-- This is turning into a fractal of horror
385-- This is turning into a fractal of horror
379-- data Fuzziness = FDateFuzziness DateFuzziness |
386-- data Fuzziness = FDateFuzziness DateFuzziness |