diff --git a/README.md b/README.md index 29666a72..4a6a13d0 100644 --- a/README.md +++ b/README.md @@ -165,20 +165,6 @@ NEARBY searches a collection for objects that intersect a specified radius.
### Search options -**SPARSE** - This option will distribute the results of a search evenly across the requested area. -This is very helpful for example; when you have many (perhaps millions) of objects and do not want them all clustered together on a map. Sparse will limit the number of objects returned and provide them evenly distributed so that your map looks clean.

-You can choose a value between 1 and 8. The value 1 will result in no more than 4 items. The value 8 will result in no more than 65536. *1=4, 2=16, 3=64, 4=256, 5=1024, 6=4098, 7=16384, 8=65536.*

- - - - - - - -
No SparsingSearch WithinSparse 1Search WithinSparse 2Search WithinSparse 3Search WithinSparse 4Search WithinSparse 5Search Within
- -*Please note that the higher the sparse value, the slower the performance. Also, LIMIT and CURSOR are not available when using SPARSE.* - **WHERE** - This option allows for filtering out results based on [field](#fields) values. For example
```nearby fleet where speed 70 +inf point 33.462 -112.268 6000``` will return only the objects in the 'fleet' collection that are within the 6 km radius **and** have a field named `speed` that is greater than `70`.

Multiple WHEREs are concatenated as **and** clauses. ```WHERE speed 70 +inf WHERE age -inf 24``` would be interpreted as *speed is over 70 and age is less than 24.*

The default value for a field is always `0`. Thus if you do a WHERE on the field `speed` and an object does not have that field set, the server will pretend that the object does and that the value is Zero. **MATCH** - MATCH is similar to WHERE except that it works on the object id instead of fields.
```nearby fleet match truck* point 33.462 -112.268 6000``` will return only the objects in the 'fleet' collection that are within the 6 km radius **and** have an object id that starts with `truck`. There can be multiple MATCH options in a single search. The MATCH value is a simple [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)). diff --git a/core/commands.json b/core/commands.json index 26c9ed69..aa1c8d12 100644 --- a/core/commands.json +++ b/core/commands.json @@ -559,12 +559,6 @@ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern", @@ -725,12 +719,6 @@ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern", @@ -971,12 +959,6 @@ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern", diff --git a/core/commands_gen.go b/core/commands_gen.go index 4e40941a..02b3cf50 100644 --- a/core/commands_gen.go +++ b/core/commands_gen.go @@ -725,12 +725,6 @@ var commandsJSON = `{ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern", @@ -891,12 +885,6 @@ var commandsJSON = `{ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern", @@ -1137,12 +1125,6 @@ var commandsJSON = `{ "type": "integer", "optional": true }, - { - "command": "SPARSE", - "name": "spread", - "type": "integer", - "optional": true - }, { "command": "MATCH", "name": "pattern",