{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/20019","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20019/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20019/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20019/events","html_url":"https://github.com/elastic/elasticsearch/issues/20019","id":171600850,"number":20019,"title":"Phrase Suggester returns different results with aliases","user":{"login":"shyam-aryan","id":20437221,"avatar_url":"https://avatars.githubusercontent.com/u/20437221?v=3","gravatar_id":"","url":"https://api.github.com/users/shyam-aryan","html_url":"https://github.com/shyam-aryan","followers_url":"https://api.github.com/users/shyam-aryan/followers","following_url":"https://api.github.com/users/shyam-aryan/following{/other_user}","gists_url":"https://api.github.com/users/shyam-aryan/gists{/gist_id}","starred_url":"https://api.github.com/users/shyam-aryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyam-aryan/subscriptions","organizations_url":"https://api.github.com/users/shyam-aryan/orgs","repos_url":"https://api.github.com/users/shyam-aryan/repos","events_url":"https://api.github.com/users/shyam-aryan/events{/privacy}","received_events_url":"https://api.github.com/users/shyam-aryan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Suggesters","name":":Suggesters","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-17T08:22:24Z","updated_at":"2016-08-23T13:04:40Z","closed_at":null,"body":"**Elasticsearch version**: 1.7.3\r\n\r\n**JVM version**: 1.8.0_65\r\n\r\n**OS version**: Oracle Linux Server release 6.5\r\n\r\nWe use a field SearchAllText in Phrase Suggester which is populated across multiple indices. We have 2 aliases:\r\n1) `search_all` which covers 34 indices.\r\n2) `index_load` which covers 30 indices. \r\n\r\nindex_load excludes 4 indices that search_all includes but rest all are same. When we run the Phrase Suggester against both we are seeing different results. Here index_load generates more suggestions than search_all alias. I would expect at least same suggestions on search_all alias as well. Any idea why the behavior is different? My expected result is `walgreen`\r\n\r\n\tGET index_load/_search?search_type=count\r\n\t{\r\n\t  \"suggest\" : {\r\n\t\t\"text\" : \"wagreen\",\r\n\t\t\"phrase_suggest\" : {\r\n\t\t  \"phrase\" : {\r\n\t\t\t\"field\" : \"SearchAllText.suggest\",\r\n\t\t\t\"size\" : 10,\r\n\t\t\t\"direct_generator\" : [ {\r\n\t\t\t  \"field\" : \"SearchAllText.suggest\",\r\n\t\t\t  \"suggest_mode\" : \"popular\",\r\n\t\t\t  \"min_word_length\" : 0,\r\n\t\t\t  \"prefix_length\" : 0,\r\n\t\t\t  \"size\" : 10\r\n\t\t\t} ],\r\n\t\t\t \"collate\": {\r\n\t\t\t\t\"query\": {\r\n\t\t\t\t  \"query_string\" : {\r\n\t\t\t\t\t\"query\" : \"{{suggestion}}\",\r\n\t\t\t\t\t\"fields\" : [ \"SearchAllText\" ],\r\n\t\t\t\t\t\"default_operator\" : \"and\",\r\n\t\t\t\t\t\"analyze_wildcard\" : true\r\n\t\t\t\t  }\r\n\t\t\t\t  },\r\n\t\t\t   \"prune\": false \r\n\t\t\t }\r\n\t\t  }\r\n\t\t}\r\n\t  }\r\n\t}\r\n\r\nReturns\r\n\r\n\t{\r\n\t   \"took\": 82,\r\n\t   \"timed_out\": false,\r\n\t   \"_shards\": {\r\n\t\t  \"total\": 60,\r\n\t\t  \"successful\": 60,\r\n\t\t  \"failed\": 0\r\n\t   },\r\n\t   \"hits\": {\r\n\t\t  \"total\": 82791251,\r\n\t\t  \"max_score\": 0,\r\n\t\t  \"hits\": []\r\n\t   },\r\n\t   \"suggest\": {\r\n\t\t  \"phrase_suggest\": [\r\n\t\t\t {\r\n\t\t\t\t\"text\": \"wagreen\",\r\n\t\t\t\t\"offset\": 0,\r\n\t\t\t\t\"length\": 7,\r\n\t\t\t\t\"options\": [\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"warren\",\r\n\t\t\t\t\t  \"score\": 0.008121356\r\n\t\t\t\t   },\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"walgreens\",\r\n\t\t\t\t\t  \"score\": 0.0037804323\r\n\t\t\t\t   },\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"walgreen\",\r\n\t\t\t\t\t  \"score\": 0.0032029075\r\n\t\t\t\t   },\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"wareena\",\r\n\t\t\t\t\t  \"score\": 0.0025363953\r\n\t\t\t\t   },\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"waren\",\r\n\t\t\t\t\t  \"score\": 0.0025306016\r\n\t\t\t\t   }\r\n\t\t\t\t]\r\n\t\t\t }\r\n\t\t  ]\r\n\t   }\r\n\t}\r\n\r\nand the same phrase query run against search_all alias returns this:\r\n\r\n\t{\r\n\t   \"took\": 89,\r\n\t   \"timed_out\": false,\r\n\t   \"_shards\": {\r\n\t\t  \"total\": 64,\r\n\t\t  \"successful\": 64,\r\n\t\t  \"failed\": 0\r\n\t   },\r\n\t   \"hits\": {\r\n\t\t  \"total\": 83151341,\r\n\t\t  \"max_score\": 0,\r\n\t\t  \"hits\": []\r\n\t   },\r\n\t   \"suggest\": {\r\n\t\t  \"phrase_suggest\": [\r\n\t\t\t {\r\n\t\t\t\t\"text\": \"wagreen\",\r\n\t\t\t\t\"offset\": 0,\r\n\t\t\t\t\"length\": 7,\r\n\t\t\t\t\"options\": [\r\n\t\t\t\t   {\r\n\t\t\t\t\t  \"text\": \"warren\",\r\n\t\t\t\t\t  \"score\": 0.008121356\r\n\t\t\t\t   }\r\n\t\t\t\t]\r\n\t\t\t }\r\n\t\t  ]\r\n\t   }\r\n\t}"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/241723256","html_url":"https://github.com/elastic/elasticsearch/issues/20019#issuecomment-241723256","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20019","id":241723256,"user":{"login":"shyam-aryan","id":20437221,"avatar_url":"https://avatars.githubusercontent.com/u/20437221?v=3","gravatar_id":"","url":"https://api.github.com/users/shyam-aryan","html_url":"https://github.com/shyam-aryan","followers_url":"https://api.github.com/users/shyam-aryan/followers","following_url":"https://api.github.com/users/shyam-aryan/following{/other_user}","gists_url":"https://api.github.com/users/shyam-aryan/gists{/gist_id}","starred_url":"https://api.github.com/users/shyam-aryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyam-aryan/subscriptions","organizations_url":"https://api.github.com/users/shyam-aryan/orgs","repos_url":"https://api.github.com/users/shyam-aryan/repos","events_url":"https://api.github.com/users/shyam-aryan/events{/privacy}","received_events_url":"https://api.github.com/users/shyam-aryan/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T13:04:40Z","updated_at":"2016-08-23T13:04:40Z","body":"Hi @areek - Did you get a chance to look into this ?"}}
{"actor":{"display_login":"shyam-aryan"}}