@@ -334,8 +334,8 @@ data Filter = AndFilter [Filter] (Maybe Cache)
334334 | OrFilter [Filter] (Maybe Cache)
335335 | BoolFilter BoolMatch (Maybe Cache)
336336 | ExistsFilter FieldName -- always cached
337− | GeoBoundingBoxFilter FieldName GeoBoundingBoxConstraint GeoFilterType (Maybe Cache)
338− | GeoDistanceFilter FieldName LatLon Distance (Maybe Cache)
337+ | GeoBoundingBoxFilter GeoBoundingBoxConstraint GeoFilterType (Maybe Cache)
338+ | GeoDistanceFilter GeoConstraint Distance (Maybe Cache)
339339 deriving (Show)
340340
341341-- I dunno.
@@ -350,14 +350,19 @@ data BoolMatch = MustMatch Term
350350data GeoFilterType = GeoFilterMemory | GeoFilterIndexed deriving (Show)
351351
352352data LatLon = LatLon { lat :: Double, lon :: Double } deriving (Show)
353−data GeoBoundingBox = { topLeft :: LatLon
354− , bottomRight :: LatLon } deriving (Show)
353+data GeoBoundingBox =
354+ GeoBoundingBox { topLeft :: LatLon
355+ , bottomRight :: LatLon } deriving (Show)
355356
356357data GeoBoundingBoxConstraint =
357− GeoBoundingBoxConstraint { geoField :: Text
358+ GeoBoundingBoxConstraint { geoField :: FieldName
358359 , constraintBox :: GeoBoundingBox
359360 } deriving (Show)
360361
362+data GeoConstraint =
363+ GeoConstraint { geoField :: FieldName
364+ , latLon :: LatLon } deriving (Show)
365+
361366data DistanceUnits = Miles
362367 | Yards
363368 | Feet
@@ -373,8 +378,10 @@ data DistanceType = Arc | SloppyArc | Plane deriving (Show)
373378-- geo_point?
374379data OptimizeBbox = GeoFilterType | NoOptimizeBbox deriving (Show)
375380
376−data Distance = { coefficient :: Double
377− , unit :: DistanceUnits } deriving (Show)
381+data Distance =
382+ Distance { coefficient :: Double
383+ , unit :: DistanceUnits } deriving (Show)
384+
378385-- This is turning into a fractal of horror
379386-- data Fuzziness = FDateFuzziness DateFuzziness |
380387