{"action":"created","issue":{"url":"https://api.github.com/repos/arangodb/arangodb/issues/1700","repository_url":"https://api.github.com/repos/arangodb/arangodb","labels_url":"https://api.github.com/repos/arangodb/arangodb/issues/1700/labels{/name}","comments_url":"https://api.github.com/repos/arangodb/arangodb/issues/1700/comments","events_url":"https://api.github.com/repos/arangodb/arangodb/issues/1700/events","html_url":"https://github.com/arangodb/arangodb/issues/1700","id":130407031,"number":1700,"title":"Geo Location / Index Intersection","user":{"login":"andreib1","id":2752520,"avatar_url":"https://avatars2.githubusercontent.com/u/2752520?v=3","gravatar_id":"","url":"https://api.github.com/users/andreib1","html_url":"https://github.com/andreib1","followers_url":"https://api.github.com/users/andreib1/followers","following_url":"https://api.github.com/users/andreib1/following{/other_user}","gists_url":"https://api.github.com/users/andreib1/gists{/gist_id}","starred_url":"https://api.github.com/users/andreib1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreib1/subscriptions","organizations_url":"https://api.github.com/users/andreib1/orgs","repos_url":"https://api.github.com/users/andreib1/repos","events_url":"https://api.github.com/users/andreib1/events{/privacy}","received_events_url":"https://api.github.com/users/andreib1/received_events","type":"User","site_admin":false},"labels":[{"id":4539382,"url":"https://api.github.com/repos/arangodb/arangodb/labels/1%20Feature","name":"1 Feature","color":"02e10c","default":false},{"id":483469884,"url":"https://api.github.com/repos/arangodb/arangodb/labels/2%20Fixed","name":"2 Fixed","color":"0052cc","default":false},{"id":5582373,"url":"https://api.github.com/repos/arangodb/arangodb/labels/3%20AQL","name":"3 AQL","color":"f9d0c4","default":false},{"id":4539396,"url":"https://api.github.com/repos/arangodb/arangodb/labels/performance","name":"performance","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"neunhoef","id":5286736,"avatar_url":"https://avatars0.githubusercontent.com/u/5286736?v=3","gravatar_id":"","url":"https://api.github.com/users/neunhoef","html_url":"https://github.com/neunhoef","followers_url":"https://api.github.com/users/neunhoef/followers","following_url":"https://api.github.com/users/neunhoef/following{/other_user}","gists_url":"https://api.github.com/users/neunhoef/gists{/gist_id}","starred_url":"https://api.github.com/users/neunhoef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neunhoef/subscriptions","organizations_url":"https://api.github.com/users/neunhoef/orgs","repos_url":"https://api.github.com/users/neunhoef/repos","events_url":"https://api.github.com/users/neunhoef/events{/privacy}","received_events_url":"https://api.github.com/users/neunhoef/received_events","type":"User","site_admin":false},"assignees":[{"login":"neunhoef","id":5286736,"avatar_url":"https://avatars0.githubusercontent.com/u/5286736?v=3","gravatar_id":"","url":"https://api.github.com/users/neunhoef","html_url":"https://github.com/neunhoef","followers_url":"https://api.github.com/users/neunhoef/followers","following_url":"https://api.github.com/users/neunhoef/following{/other_user}","gists_url":"https://api.github.com/users/neunhoef/gists{/gist_id}","starred_url":"https://api.github.com/users/neunhoef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neunhoef/subscriptions","organizations_url":"https://api.github.com/users/neunhoef/orgs","repos_url":"https://api.github.com/users/neunhoef/repos","events_url":"https://api.github.com/users/neunhoef/events{/privacy}","received_events_url":"https://api.github.com/users/neunhoef/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/arangodb/arangodb/milestones/38","html_url":"https://github.com/arangodb/arangodb/milestone/38","labels_url":"https://api.github.com/repos/arangodb/arangodb/milestones/38/labels","id":2110260,"number":38,"title":"3.2","description":"","creator":{"login":"pluma","id":1280922,"avatar_url":"https://avatars1.githubusercontent.com/u/1280922?v=3","gravatar_id":"","url":"https://api.github.com/users/pluma","html_url":"https://github.com/pluma","followers_url":"https://api.github.com/users/pluma/followers","following_url":"https://api.github.com/users/pluma/following{/other_user}","gists_url":"https://api.github.com/users/pluma/gists{/gist_id}","starred_url":"https://api.github.com/users/pluma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluma/subscriptions","organizations_url":"https://api.github.com/users/pluma/orgs","repos_url":"https://api.github.com/users/pluma/repos","events_url":"https://api.github.com/users/pluma/events{/privacy}","received_events_url":"https://api.github.com/users/pluma/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":23,"state":"open","created_at":"2016-11-02T17:37:58Z","updated_at":"2017-06-12T10:46:01Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-02-01T16:15:52Z","updated_at":"2017-06-12T14:10:50Z","closed_at":null,"body":"I'm re-opening #1536 \n\nA typical use case for us is:\n\nA user is standing in a city where many hundreds / thousands of clients are running this software.  There may be thousands within a mile radius of him, some online, some offline.\n\nGiven a client collection with a geospacial index on client.lat and client.lon, and a hash index on client.online ... find:\n\n```\nclient(s) WITHIN a 1 mile radius,\nFILTER by client.online,\nLIMIT the number to 400,\nRETURN their client.id\n```\n\nWITHIN() performance has increased with the release of 2.8.0.  However, any filters introduced, force a scan of the entire WITHIN() result set.\n\nI believe that WITHIN() should acknowledge and use indexed filters based upon the same collection for result subtraction.\n\nAs far as I can tell, this probably falls into the wider scoped use case for Index Intersection; i.e. using more than one index in a filter clause with && statements.\n"},"comment":{"url":"https://api.github.com/repos/arangodb/arangodb/issues/comments/307801104","html_url":"https://github.com/arangodb/arangodb/issues/1700#issuecomment-307801104","issue_url":"https://api.github.com/repos/arangodb/arangodb/issues/1700","id":307801104,"user":{"login":"andreib1","id":2752520,"avatar_url":"https://avatars2.githubusercontent.com/u/2752520?v=3","gravatar_id":"","url":"https://api.github.com/users/andreib1","html_url":"https://github.com/andreib1","followers_url":"https://api.github.com/users/andreib1/followers","following_url":"https://api.github.com/users/andreib1/following{/other_user}","gists_url":"https://api.github.com/users/andreib1/gists{/gist_id}","starred_url":"https://api.github.com/users/andreib1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreib1/subscriptions","organizations_url":"https://api.github.com/users/andreib1/orgs","repos_url":"https://api.github.com/users/andreib1/repos","events_url":"https://api.github.com/users/andreib1/events{/privacy}","received_events_url":"https://api.github.com/users/andreib1/received_events","type":"User","site_admin":false},"created_at":"2017-06-12T14:10:50Z","updated_at":"2017-06-12T14:10:50Z","body":"Thanks dothebart!\r\n\r\nI just tried this on the nightly, and this brings us much closer to achieving the result.  However:\r\n\r\nGiven a client collection with a geospacial index on client.lat and client.lon, and a hash index on client.online ... find:\r\n\r\nFOR client in clients \r\nFILTER by client.online == true,\r\nSORT DISTANCE(client.latitude, client.longitude, 0, 0)\r\nLIMIT 400\r\nRETURN client.id\r\n\r\nWill only hit one index (the geo one).  Without index intersection on AND queries, and SORT statements, it won't use the hash index on client.online.\r\n\r\nI don't think this is an outlier case, as many other comparable databases include this functionality:\r\n\r\nMongodb's intersection is as follows:\r\nhttps://docs.mongodb.com/manual/core/index-intersection/\r\n\r\nMarklogic uses similar behaviour to get query performance:\r\nhttps://docs.marklogic.com/guide/concepts/indexing\r\n\r\nSQL Server index intersection is ubiquitous:\r\nhttps://books.google.co.uk/books?id=nvLpCgAAQBAJ&pg=PA262&lpg=PA262&dq=sql+server+index+intersection\r\n\r\n"}}
{"actor":{"display_login":"andreib1"}}