{"action":"created","issue":{"url":"https://api.github.com/repos/SoftInstigate/restheart/issues/83","labels_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/83/comments","events_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/83/events","html_url":"https://github.com/SoftInstigate/restheart/issues/83","id":123795819,"number":83,"title":"Error using \"$and\" / \"&\" on filter ","user":{"login":"machine16","id":14872922,"avatar_url":"https://avatars.githubusercontent.com/u/14872922?v=3","gravatar_id":"","url":"https://api.github.com/users/machine16","html_url":"https://github.com/machine16","followers_url":"https://api.github.com/users/machine16/followers","following_url":"https://api.github.com/users/machine16/following{/other_user}","gists_url":"https://api.github.com/users/machine16/gists{/gist_id}","starred_url":"https://api.github.com/users/machine16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machine16/subscriptions","organizations_url":"https://api.github.com/users/machine16/orgs","repos_url":"https://api.github.com/users/machine16/repos","events_url":"https://api.github.com/users/machine16/events{/privacy}","received_events_url":"https://api.github.com/users/machine16/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SoftInstigate/restheart/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-24T11:54:35Z","updated_at":"2015-12-28T13:53:13Z","closed_at":null,"body":"So i tried doing a query like this:\r\n\r\nhttp -a a:a GET 127.0.0.1:8080/final/mydb?filter={'$and':[{'DATE_T':{'$gte':{'$date':'1444394813459'}}},{'DATE_T':{'$lte':{'$date':'1444395025082'}}}]}\r\n\r\nand i get an error of illegal expression.\r\n\r\nalso tried this:\r\n\r\nhttp -a a:a GET 127.0.0.1:8080/final/mydb?filter={'DATE_T':{'$gte':{'$date':'1444394813459'}}}&filter={'DATE_T':{ '$lte':{'$date':'1444395025082'}}}\r\n\r\nbut it only filters the first one...\r\n\r\nany suggestions?"},"comment":{"url":"https://api.github.com/repos/SoftInstigate/restheart/issues/comments/167575540","html_url":"https://github.com/SoftInstigate/restheart/issues/83#issuecomment-167575540","issue_url":"https://api.github.com/repos/SoftInstigate/restheart/issues/83","id":167575540,"user":{"login":"machine16","id":14872922,"avatar_url":"https://avatars.githubusercontent.com/u/14872922?v=3","gravatar_id":"","url":"https://api.github.com/users/machine16","html_url":"https://github.com/machine16","followers_url":"https://api.github.com/users/machine16/followers","following_url":"https://api.github.com/users/machine16/following{/other_user}","gists_url":"https://api.github.com/users/machine16/gists{/gist_id}","starred_url":"https://api.github.com/users/machine16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machine16/subscriptions","organizations_url":"https://api.github.com/users/machine16/orgs","repos_url":"https://api.github.com/users/machine16/repos","events_url":"https://api.github.com/users/machine16/events{/privacy}","received_events_url":"https://api.github.com/users/machine16/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T13:53:12Z","updated_at":"2015-12-28T13:53:12Z","body":"i have limited the answer to 2 results because otherwise it gives more than 100 results, and the second one is already out of range...\r\n\r\nhttp -a a:a GET 127.0.0.1:8080/final/mydb?filter={'DATE_T':{'$gte':{'$date':'1444378063479'}}}\\&filter={'DATE_T':{'$lte':{'$date':'1444378063480'}}}\\&pagesize=2\r\nHTTP/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Expose-Headers: Location, ETag, Auth-Token, Auth-Token-Valid-Until, Auth-Token-Location, X-Powered-By\r\nAuth-Token: 9b519daa-c3c8-49d7-81da-675f0cc9682f\r\nAuth-Token-Location: /_authtokens/a\r\nAuth-Token-Valid-Until: 2015-12-28T13:51:00.358Z\r\nConnection: keep-alive\r\nContent-Encoding: gzip\r\nContent-Length: 503\r\nContent-Type: application/hal+json\r\nDate: Mon, 28 Dec 2015 13:36:00 GMT\r\nETag: 567972b921d89e1d020c4a68\r\nX-Powered-By: restheart.org\r\n\r\n{\r\n\t\"_collection-props-cached\": false,\r\n\t\"_created_on\": \"2015-12-22T15:56:41Z\",\r\n\t\"_embedded\": {\r\n    \t\"rh:doc\": [\r\n        \t{\r\n            \t\"DATE_T\": {\r\n                \t\t\"$date\": 1444378063479\r\n},\r\n…\r\n},\r\n{\r\n            \"DATE_T\": {\r\n                \t\"$date\": 1444377872685\r\n            },\r\n...\r\n}\r\n]\r\n}\r\n\"_etag\": {\r\n    \t\"$oid\": \"567972b921d89e1d020c4a68\"\r\n\t},\r\n\t\"_id\": \"mydb\",\r\n\t\"_links\": {\r\n    \t\"curies\": [],\r\n    \t\"self\": {\r\n        \t\"href\": \"/final/mydb?filter={DATE_T:{$gte:{$date:1444378063479}}}&filter={DATE_T:{$lte:{$date:1444378063480}}}&pagesize=2\"\r\n    \t}\r\n\t},\r\n\t\"_returned\": 2"}}