{"action":"created","issue":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/49","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/49/comments","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/49/events","html_url":"https://github.com/elasticsearch/elasticsearch-dsl-py/issues/49","id":53205917,"number":49,"title":"Querying for a range of dates.","user":{"login":"DavidAwad","id":4019054,"avatar_url":"https://avatars.githubusercontent.com/u/4019054?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidAwad","html_url":"https://github.com/DavidAwad","followers_url":"https://api.github.com/users/DavidAwad/followers","following_url":"https://api.github.com/users/DavidAwad/following{/other_user}","gists_url":"https://api.github.com/users/DavidAwad/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidAwad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidAwad/subscriptions","organizations_url":"https://api.github.com/users/DavidAwad/orgs","repos_url":"https://api.github.com/users/DavidAwad/repos","events_url":"https://api.github.com/users/DavidAwad/events{/privacy}","received_events_url":"https://api.github.com/users/DavidAwad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2014-12-31T22:11:04Z","updated_at":"2015-03-06T05:27:26Z","closed_at":"2015-01-05T15:49:41Z","body":"Hello Honza, I'm hoping you might be able to help me out with one last issue i'm having. I need to query for all articles that have 404 errors as a response field and I also need to find all of them from withing the lasts 15 inutes. The issues show up inside of Kibana but they are not showing in my queries. \r\n\r\nI've been having a really hard time getting this to work and there aren't any clear examples of querying in a specific range of time in the docs. \r\nHere's my script. \r\n\r\n```python \r\ns = Search(using=es, index= \"_all\") \\\r\n        .query(\"match\", response = \"404\")\\\r\n        .filter('range', timestamp={'from': datetime.datetime.now() - datetime.timedelta(minutes=15), 'to' : datetime.datetime.now() }) #, 'lte': datetime(2010, 10, 9)})\r\n        #.filter(\"range\", '@timestamp': {\"gte\": \"now-15m\", \"lte\": \"now\"}) #, \"lt\" : \"2014-12-31 1:00:00\"}) \r\n        #filter is for a range of possible times. \r\n        #.filter(\"range\", timestamp={ \"gt\":\"now -5m\",\"lt\":\"now\" })\r\nresponse = s.execute()\r\n```"},"comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/comments/77508848","html_url":"https://github.com/elasticsearch/elasticsearch-dsl-py/issues/49#issuecomment-77508848","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch-dsl-py/issues/49","id":77508848,"user":{"login":"jawadyousaf","id":11344647,"avatar_url":"https://avatars.githubusercontent.com/u/11344647?v=3","gravatar_id":"","url":"https://api.github.com/users/jawadyousaf","html_url":"https://github.com/jawadyousaf","followers_url":"https://api.github.com/users/jawadyousaf/followers","following_url":"https://api.github.com/users/jawadyousaf/following{/other_user}","gists_url":"https://api.github.com/users/jawadyousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/jawadyousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawadyousaf/subscriptions","organizations_url":"https://api.github.com/users/jawadyousaf/orgs","repos_url":"https://api.github.com/users/jawadyousaf/repos","events_url":"https://api.github.com/users/jawadyousaf/events{/privacy}","received_events_url":"https://api.github.com/users/jawadyousaf/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T05:27:26Z","updated_at":"2015-03-06T05:27:26Z","body":"Hi All,\r\n\r\nI am newbie to ElasticSearch and its java api. I want to search result that are logged within date and time range. I put this question on stackoiverflow but no response so far. You can see the question from\r\n\r\nhttp://stackoverflow.com/questions/28875738/how-to-search-log-within-specific-range-of-date-and-time-in-elasticsearch-using\r\n\r\nI know on this page already most relevent discussion is done but still i could not run it. Kindly help me begin with the good startup with elasticsearch and java api.\r\n\r\nBest Regards,"}}