{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/19547","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19547/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19547/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19547/events","html_url":"https://github.com/elastic/elasticsearch/issues/19547","id":166998819,"number":19547,"title":"Multiple fields provided to queries return results for the last one only","user":{"login":"einorler","id":13484571,"avatar_url":"https://avatars.githubusercontent.com/u/13484571?v=3","gravatar_id":"","url":"https://api.github.com/users/einorler","html_url":"https://github.com/einorler","followers_url":"https://api.github.com/users/einorler/followers","following_url":"https://api.github.com/users/einorler/following{/other_user}","gists_url":"https://api.github.com/users/einorler/gists{/gist_id}","starred_url":"https://api.github.com/users/einorler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einorler/subscriptions","organizations_url":"https://api.github.com/users/einorler/orgs","repos_url":"https://api.github.com/users/einorler/repos","events_url":"https://api.github.com/users/einorler/events{/privacy}","received_events_url":"https://api.github.com/users/einorler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Query%20DSL","name":":Query DSL","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/adoptme","name":"adoptme","color":"207de5"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-22T08:49:51Z","updated_at":"2016-07-27T15:26:02Z","closed_at":null,"body":"**Elasticsearch version**: 2.3.4\r\n\r\n**JVM version**: 1.8\r\n\r\n**OS version**: OSX 10.11\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\n\r\nThere is a possibility to provide multiple fields to queries like so:\r\n\r\n```json\r\n{\r\n  \"query\": {\r\n    \"range\": {\r\n      \"age\": {\r\n        \"gte\": 30,\r\n        \"lte\": 40\r\n      },\r\n      \"price\": {\r\n        \"gte\": 10,\r\n        \"lte\": 30\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nHere I provide two fields to a single query and elasticsearch provides legitimate results for such a query. However, the results returned always only include hits from the last field request, that is, if I were to execute the query given above, I would only get results from the `price` field. Moreover I could not find any mentions of such behaviour in the official docs. \r\nAnalogous behaviour was observed with `prefix`, `regexp`, `geo_distance` queries and more.\r\nLogically this should either provide the hits for both provided fields or not work at all.\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/235621654","html_url":"https://github.com/elastic/elasticsearch/issues/19547#issuecomment-235621654","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/19547","id":235621654,"user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T15:26:02Z","updated_at":"2016-07-27T15:26:02Z","body":"This query doesn't throw an exception in 5.0, and it should."}}
{"actor":{"display_login":"clintongormley"}}