added experimental spatial filter support

This commit is contained in:
Guillaume Buisson 2015-09-29 15:12:32 +02:00
parent 2a38e17c4c
commit 8cca4c5ddf

View file

@ -23,12 +23,27 @@ Selector filters can be used as the base filters for more complex Boolean expres
:dimension s/Str
:function s/Str})
;Experimental
(s/defschema spatialFilter
{:type (s/enum :spatial)
:dimension s/Str
:bound (s/either
{:type (s/enum :rectangular)
:minCoords [Float]
:maxCoords [Float]}
{:type (s/enum :radius)
:coords [Float]
:radius Float})})
(s/defschema Filter
"A filter is a JSON object indicating which rows of data should be included in the computation for a query.
Its essentially the equivalent of the WHERE clause in SQL. Druid supports the following types of filters."
(s/either selectorFilter
regexFilter
javascriptFilter
spatialFilter
{:type (s/enum :not)
:field (s/recursive #'Filter)}
{:type (s/enum :or :and)