A newer version of this documentation is available.

View Latest

Open Range Queries

    +
    Open range queries specify null as a value on either one or both sides of the range.

    For example, to query shops in Germany that are open between 10:00 and 20:00.

    In this case, the emit could be:

    emit([{
       "type": "Point",
       "coordinates":[10.9, 48.4]
    }, [1000, 2000]], null);

    To query for shops in Germany with an opening time of 10:00 and no closing time:

    ?start_range=[5.87,47.27,1000]&end_range=[15.04,55.06,null]

    To query for shops in Germany with no opening time and a closing time of 20:00:

    ?start_range=[5.87,47.27,null]&end_range=[15.04,55.06,2000]

    To query for shops in Germany with no opening or closing time:

    ?start_range=[5.87,47.27,null]&end_range=[15.04,55.06,null]

    To query for shops anywhere (no location specified) with an opening time of 10:00 and a closing time of 20:00:

    ?start_range=[null,null,1000]&end_range=[null,null,2000]