{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/10559","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10559/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10559/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10559/events","html_url":"https://github.com/elastic/elasticsearch/issues/10559","id":68028384,"number":10559,"title":"Highlighting targeted fields","user":{"login":"anshudutta","id":618721,"avatar_url":"https://avatars.githubusercontent.com/u/618721?v=3","gravatar_id":"","url":"https://api.github.com/users/anshudutta","html_url":"https://github.com/anshudutta","followers_url":"https://api.github.com/users/anshudutta/followers","following_url":"https://api.github.com/users/anshudutta/following{/other_user}","gists_url":"https://api.github.com/users/anshudutta/gists{/gist_id}","starred_url":"https://api.github.com/users/anshudutta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshudutta/subscriptions","organizations_url":"https://api.github.com/users/anshudutta/orgs","repos_url":"https://api.github.com/users/anshudutta/repos","events_url":"https://api.github.com/users/anshudutta/events{/privacy}","received_events_url":"https://api.github.com/users/anshudutta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-13T07:24:23Z","updated_at":"2015-04-13T11:52:50Z","closed_at":"2015-04-13T11:52:50Z","body":"I am having problems highlighting targeted fields. Lets say I have a query as below\r\n{\r\n   \"size\": 10,\r\n   \"from\": 0,\r\n   \"query\": {\r\n      \"filtered\": {\r\n         \"query\": {\r\n            \"query_string\": {\r\n               \"query\": \"subject:Librar? AND title:event\"\r\n            }\r\n         }\r\n      }\r\n   },\r\n   \"highlight\": {\r\n      \"fields\": {\r\n         \"subject\": {\r\n            \"number_of_fragments\": 0\r\n         },\r\n         \"title\": {\r\n            \"number_of_fragments\": 0\r\n         }\r\n      }\r\n   }\r\n}\r\n\r\nWhat I expect is that - all words in the field subject matching the expression \"Librar?\" to get highlighted and all words in the field title containing \"event\" should get highlighted. However, I get library in titles as highlighted. If I change the query to .. \"subject:Library AND title:event\", i get the expected result. The wildcard * or ? seems to throw off the highlighting. Is there a fix or am i doing something wrong."}}