{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/23184","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23184/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23184/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23184/events","html_url":"https://github.com/elastic/elasticsearch/pull/23184","id":207804940,"node_id":"MDExOlB1bGxSZXF1ZXN0MTA2MzEwODE4","number":23184,"title":"Add new DateRangeQueryBuilder","user":{"login":"martinscholz83","id":19551763,"node_id":"MDQ6VXNlcjE5NTUxNzYz","avatar_url":"https://avatars0.githubusercontent.com/u/19551763?v=4","gravatar_id":"","url":"https://api.github.com/users/martinscholz83","html_url":"https://github.com/martinscholz83","followers_url":"https://api.github.com/users/martinscholz83/followers","following_url":"https://api.github.com/users/martinscholz83/following{/other_user}","gists_url":"https://api.github.com/users/martinscholz83/gists{/gist_id}","starred_url":"https://api.github.com/users/martinscholz83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinscholz83/subscriptions","organizations_url":"https://api.github.com/users/martinscholz83/orgs","repos_url":"https://api.github.com/users/martinscholz83/repos","events_url":"https://api.github.com/users/martinscholz83/events{/privacy}","received_events_url":"https://api.github.com/users/martinscholz83/received_events","type":"User","site_admin":false},"labels":[{"id":493198109,"node_id":"MDU6TGFiZWw0OTMxOTgxMDk=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Core/Java%20High%20Level%20REST%20Client","name":":Core/Java High Level REST Client","color":"0e8a16","default":false},{"id":23174,"node_id":"MDU6TGFiZWwyMzE3NA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Eenhancement","name":">enhancement","color":"4a4ea8","default":false},{"id":111416437,"node_id":"MDU6TGFiZWwxMTE0MTY0Mzc=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04","default":false},{"id":113234020,"node_id":"MDU6TGFiZWwxMTMyMzQwMjA=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/stalled","name":"stalled","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-02-15T13:32:57Z","updated_at":"2018-06-01T13:27:22Z","closed_at":"2018-06-01T13:27:22Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/23184","html_url":"https://github.com/elastic/elasticsearch/pull/23184","diff_url":"https://github.com/elastic/elasticsearch/pull/23184.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/23184.patch"},"body":"This PR implements a new API `DateRangeQueryBuilder` like discussed in #23014. Like @markharwood said this client only accepts dates as input instead of objects. This should behave unexpected parsing errors like in #23014. In the end the query is the same like in `RangeQueryBuilder` `LongPoint.newRangeQuery(fieldName, l, u`. So this my second PR for elasticsearch. Maybe there are things wrong. Which is to considered is the input format. I have chosen `DateTime` because i think this is widely used. Another thing is should this client only available for the Java API or maybe it makes sense to implement this as a complet new query type. For example\r\n```json\r\n{ \r\n    \"daterange\" : {\r\n        \"post_date\" : {\r\n            \"gte\": \"2014-11-05||/M\", \r\n            \"lte\": \"2014-12-08||/d\"\r\n        }\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/393880034","html_url":"https://github.com/elastic/elasticsearch/pull/23184#issuecomment-393880034","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23184","id":393880034,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzg4MDAzNA==","user":{"login":"colings86","id":236731,"node_id":"MDQ6VXNlcjIzNjczMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/236731?v=4","gravatar_id":"","url":"https://api.github.com/users/colings86","html_url":"https://github.com/colings86","followers_url":"https://api.github.com/users/colings86/followers","following_url":"https://api.github.com/users/colings86/following{/other_user}","gists_url":"https://api.github.com/users/colings86/gists{/gist_id}","starred_url":"https://api.github.com/users/colings86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colings86/subscriptions","organizations_url":"https://api.github.com/users/colings86/orgs","repos_url":"https://api.github.com/users/colings86/repos","events_url":"https://api.github.com/users/colings86/events{/privacy}","received_events_url":"https://api.github.com/users/colings86/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T13:27:22Z","updated_at":"2018-06-01T13:27:22Z","author_association":"MEMBER","body":"We discussed this in FixItFriday and we would rather add the DateTime methods to the existing DateRangeQueryBuilder and deprecate the existing Object methods (and then remove in a later version). However we are currently working towards moving to using java.time instead of joda time for Dates (https://github.com/elastic/elasticsearch/issues/27330) so to avoid having to change things twice we would rather wait until that change is made and do it as part of that work. "}}
{"actor":{"display_login":"colings86"}}