Commit Graph

32 Commits

Author SHA1 Message Date
Josh Baker 248ccfbe8a Filter id match before kNN results
fixes 
2018-03-09 19:50:34 -07:00
Josh Baker 7538cc73ff avoid recover calls for non-lua queries
The defer recover() pattern is expensive and only Lua queries require
it, so for now we'll just check if lua is being used before calling.
2018-03-05 11:10:40 -07:00
Alex Roitman 29f4737e5d Add WHEREEVAL clause to scan/search commands. 2018-02-15 11:08:27 -08:00
Alex Roitman 1084c60805 Apply limit on top of cursor 2017-10-31 09:48:17 -07:00
Alex Roitman 4eca0cdee7 Attempt to fix NEARBY to filter prior to limiting. 2017-10-30 16:01:37 -07:00
Alex Roitman b55300b729 Lua scripting feature. ()
* Start on lua scripting

* Implement evalsha, script load, script exists, and script flush

* Type conversions from lua to resp/json.
Refactor to make luastate and luascripts persistent in the controller.

* Change controller.command and all underlying commands to return resp.Value.
Serialize only during the ouput.

* First stab at tile38 call from lua

* Change tile38 into tile38.call in Lua

* Property return errors from scripts

* Minor refactoring.  No locking on script run

* Cleanup/refactoring

* Create a pool of 5 lua states, allow for more as needed. Refactor.

* Use safe map for scripts.  Add a limit for max number of lua states.  Refactor.

* Refactor

* Refactor script commands into atomic, read-only, and non-atomic classes.
Proper locking for all three classes.
Add tests for scripts

* More tests for scripts

* Properly escape newlines in lua-produced errors

* Better test for readonly failure

* Correctly convert ok/err messages between lua and resp.
Add pcall, sha1hex, error_reply, status_reply functions to tile38 namespace in lua.

* Add pcall test. Change writeErr to work with string argument

* Make sure eval/evalsha never attempt to write AOF

* Add eval-set and eval-get to benchmarks

* Fix eval benchmark tests, add more

* Improve benchmarks

* Optimizations and refactoring.

* Add lua memtest

* Typo

* Add dependency

* golint fixes

* gofmt fixes

* Add scripting commands to the core/commands.json

* Use ARGV for args inside lua
2017-10-05 08:20:40 -07:00
Alex Roitman c8ed7caa2e Add wherein command 2017-08-23 13:13:12 -07:00
Josh Baker cd057088d9 index optimizations 2017-08-10 17:32:40 -07:00
Josh Baker e2357eac3e empty results when key not found, 2017-08-03 04:01:07 -07:00
Josh Baker 90f87bc3fb knn overscan ordering () 2017-07-25 20:23:21 -07:00
Josh Baker 3fae3f70eb allow KNN cursors 2017-07-24 08:42:12 -07:00
Josh Baker 300635727a apply LIMIT after WHERE clause, fix 2017-07-24 08:26:48 -07:00
Josh Baker f9fa48db21 use redis-style expires
Updated the Tile38 expires to match the Redis implmentation at
https://redis.io/commands/expire#how-redis-expires-keys.

It now supports passive and active expires with sub-millisecond
accuracy.

This addresses issue 
2017-03-29 12:50:04 -07:00
Josh Baker 04290ec535 KNN results for NEARBY command
This commit includes the ability to search for k nearest neighbors using
a NEARBY command. When the LIMIT keyword is included and the 'meters'
param is excluded, the knn algorithm will be used instead of the
standard overlap+haversine algorithm.

   NEARBY fleet LIMIT 10 POINT 33.5 -115.8

This will find the 10 closest points to 33.5,-115.8.

closes , , and .
ping @tomquas, @joernroeder, and @m1ome
2017-01-30 16:41:12 -07:00
Josh Baker 2945479321 Allow 3d object searches with 2d geojson area
fixes 
2017-01-13 09:31:35 -07:00
w1n2k 1b20a4c590 Added distance to NEARBY command 2017-01-10 19:49:48 +03:00
Josh Baker ef74a63c79 Add SCAN to Roaming Geofences
Can now get back more details about an object:

     NEARBY people FENCE ROAM people * 5000 SCAN :*

For more information see 

Thanks @amorskoy for suggesting feature in 

Closes 
2016-12-15 11:37:38 -07:00
Josh Baker 3a483e55ff Group geofence events
Feature request by @huangpeizhi 
2016-12-06 10:30:48 -07:00
Josh Baker cbeab30d5e allow for precise search for strings, fixes 2016-11-14 11:03:54 -07:00
Josh Baker c425d76374 Z optimized, fixed 2016-10-03 13:03:20 -07:00
Josh Baker 53ceb4ee2e removed ScanType 2016-07-12 22:59:36 -06:00
Josh Baker 4656c4c8f3 refactor field 2016-07-12 22:51:01 -06:00
Josh Baker b08c686c64 SEARCH command 2016-07-12 21:11:02 -06:00
Josh Baker 75adea6a9c scan order asc/desc 2016-07-12 13:18:16 -06:00
Josh Baker 02ff2a70bf basic string support 2016-07-10 22:40:18 -06:00
Josh Baker 8fdc35af61 roaming fence 2016-05-23 13:01:42 -07:00
Josh Baker cd217f05d2 fixes , invalid object keyword, panic on missing key 2016-04-19 05:38:02 -07:00
Josh Baker 6eb21b890c fixed shared string issue 2016-04-02 14:13:20 -07:00
Josh Baker 3f2977b300 resp search 2016-03-28 14:16:21 -07:00
Josh Baker bbb29b9349 isolated fence method 2016-03-19 07:16:19 -07:00
Josh Baker 72de5cc778 refactor 2016-03-06 07:55:00 -07:00
Josh Baker 4fc58f7f5c first commit 2016-03-04 16:08:16 -07:00