Deprecate sparse

This commit is contained in:
tidwall 2021-12-08 15:52:04 -07:00
parent f7980eaa3f
commit 54a574bbc2
3 changed files with 0 additions and 50 deletions

View File

@ -165,20 +165,6 @@ NEARBY searches a collection for objects that intersect a specified radius.
<BR CLEAR="ALL">
### 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.<br><br>
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.*<br><br>
<table>
<td>No Sparsing<img src="/.github/images/sparse-none.png" width="100" height="100" border="0" alt="Search Within"></td>
<td>Sparse 1<img src="/.github/images/sparse-1.png" width="100" height="100" border="0" alt="Search Within"></td>
<td>Sparse 2<img src="/.github/images/sparse-2.png" width="100" height="100" border="0" alt="Search Within"></td>
<td>Sparse 3<img src="/.github/images/sparse-3.png" width="100" height="100" border="0" alt="Search Within"></td>
<td>Sparse 4<img src="/.github/images/sparse-4.png" width="100" height="100" border="0" alt="Search Within"></td>
<td>Sparse 5<img src="/.github/images/sparse-5.png" width="100" height="100" border="0" alt="Search Within"></td>
</table>
*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<br>```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`. <br><br>Multiple WHEREs are concatenated as **and** clauses. ```WHERE speed 70 +inf WHERE age -inf 24``` would be interpreted as *speed is over 70 <b>and</b> age is less than 24.*<br><br>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.<br>```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)).

View File

@ -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",

View File

@ -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",