Updated readme
14
README.md
|
@ -153,6 +153,20 @@ 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="/internal/assets/sparse-none.png" width="100" height="100" border="0" alt="Search Within"></td>
|
||||
<td>Sparse 1<img src="/internal/assets/sparse-1.png" width="100" height="100" border="0" alt="Search Within"></td>
|
||||
<td>Sparse 2<img src="/internal/assets/sparse-2.png" width="100" height="100" border="0" alt="Search Within"></td>
|
||||
<td>Sparse 3<img src="/internal/assets/sparse-3.png" width="100" height="100" border="0" alt="Search Within"></td>
|
||||
<td>Sparse 4<img src="/internal/assets/sparse-4.png" width="100" height="100" border="0" alt="Search Within"></td>
|
||||
<td>Sparse 5<img src="/internal/assets/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.
|
||||
|
||||
|
|
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 196 KiB |