{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/13795","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13795/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13795/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/13795/events","html_url":"https://github.com/elastic/elasticsearch/issues/13795","id":108332589,"number":13795,"title":" Add support of field boost in prefix query #5418 ","user":{"login":"jCalamari","id":9678999,"avatar_url":"https://avatars.githubusercontent.com/u/9678999?v=3","gravatar_id":"","url":"https://api.github.com/users/jCalamari","html_url":"https://github.com/jCalamari","followers_url":"https://api.github.com/users/jCalamari/followers","following_url":"https://api.github.com/users/jCalamari/following{/other_user}","gists_url":"https://api.github.com/users/jCalamari/gists{/gist_id}","starred_url":"https://api.github.com/users/jCalamari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jCalamari/subscriptions","organizations_url":"https://api.github.com/users/jCalamari/orgs","repos_url":"https://api.github.com/users/jCalamari/repos","events_url":"https://api.github.com/users/jCalamari/events{/privacy}","received_events_url":"https://api.github.com/users/jCalamari/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/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-25T14:01:23Z","updated_at":"2016-01-28T18:15:39Z","closed_at":"2016-01-28T18:15:39Z","body":"I am facing very similar issue as described in #5418. Having and index and mapping from #5418, following query:\r\n\r\n```curl -XPOST 'http://localhost:9200/messages/_search' -d '{ \"query\" : { \"query_string\" : { \"query\" : \"tes*\" , \"rewrite\" : \"top_terms_10\" } } , \"explain\" : true }' | python -mjson.tool```\r\n\r\nreturns results with no boost applied for document with ID 1 (mind the wildcard). I tried using `analyze_wildcard` and all sort of combinations of `top_terms...N` as @clintongormley suggested - no luck.\r\n\r\nES 1.7.2.\r\n\r\nOutput:\r\n\r\n```\r\n\r\n    \"_shards\": {\r\n        \"failed\": 0,\r\n        \"successful\": 5,\r\n        \"total\": 5\r\n    },\r\n    \"hits\": {\r\n        \"hits\": [\r\n            {\r\n                \"_explanation\": {\r\n                    \"description\": \"weight(_all:test in 0) [PerFieldSimilarity], result of:\",\r\n                    \"details\": [\r\n                        {\r\n                            \"description\": \"fieldWeight in 0, product of:\",\r\n                            \"details\": [\r\n                                {\r\n                                    \"description\": \"tf(freq=1.0), with freq of:\",\r\n                                    \"details\": [\r\n                                        {\r\n                                            \"description\": \"termFreq=1.0\",\r\n                                            \"value\": 1.0\r\n                                        }\r\n                                    ],\r\n                                    \"value\": 1.0\r\n                                },\r\n                                {\r\n                                    \"description\": \"idf(docFreq=1, maxDocs=1)\",\r\n                                    \"value\": 0.30685282\r\n                                },\r\n                                {\r\n                                    \"description\": \"fieldNorm(doc=0)\",\r\n                                    \"value\": 0.5\r\n                                }\r\n                            ],\r\n                            \"value\": 0.15342641\r\n                        }\r\n                    ],\r\n                    \"value\": 0.15342641\r\n                },\r\n                \"_id\": \"1\",\r\n                \"_index\": \"messages\",\r\n                \"_node\": \"CYrdARWXRwSA2lX-yTU8uw\",\r\n                \"_score\": 0.15342641,\r\n                \"_shard\": 2,\r\n                \"_source\": {\r\n                    \"comment\": \"whatever\",\r\n                    \"message\": \"test message\",\r\n                    \"user\": \"user1\"\r\n                },\r\n                \"_type\": \"message\"\r\n            },\r\n            {\r\n                \"_explanation\": {\r\n                    \"description\": \"weight(_all:test in 0) [PerFieldSimilarity], result of:\",\r\n                    \"details\": [\r\n                        {\r\n                            \"description\": \"fieldWeight in 0, product of:\",\r\n                            \"details\": [\r\n                                {\r\n                                    \"description\": \"tf(freq=1.0), with freq of:\",\r\n                                    \"details\": [\r\n                                        {\r\n                                            \"description\": \"termFreq=1.0\",\r\n                                            \"value\": 1.0\r\n                                        }\r\n                                    ],\r\n                                    \"value\": 1.0\r\n                                },\r\n                                {\r\n                                    \"description\": \"idf(docFreq=1, maxDocs=1)\",\r\n                                    \"value\": 0.30685282\r\n                                },\r\n                                {\r\n                                    \"description\": \"fieldNorm(doc=0)\",\r\n                                    \"value\": 0.4375\r\n                                }\r\n                            ],\r\n                            \"value\": 0.13424811\r\n                        }\r\n                    ],\r\n                    \"value\": 0.13424811\r\n                },\r\n                \"_id\": \"2\",\r\n                \"_index\": \"messages\",\r\n                \"_node\": \"CYrdARWXRwSA2lX-yTU8uw\",\r\n                \"_score\": 0.13424811,\r\n                \"_shard\": 3,\r\n                \"_source\": {\r\n                    \"comment\": \"test comment\",\r\n                    \"message\": \"hello world\",\r\n                    \"user\": \"user2\"\r\n                },\r\n                \"_type\": \"message\"\r\n            }\r\n        ],\r\n        \"max_score\": 0.15342641,\r\n        \"total\": 2\r\n    },\r\n    \"timed_out\": false,\r\n    \"took\": 1\r\n}\r\n```\r\n "}}