{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/22357","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22357/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22357/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22357/events","html_url":"https://github.com/elastic/elasticsearch/issues/22357","id":197766622,"number":22357,"title":"Very slow completion suggester","user":{"login":"sicarrots","id":1238020,"avatar_url":"https://avatars.githubusercontent.com/u/1238020?v=3","gravatar_id":"","url":"https://api.github.com/users/sicarrots","html_url":"https://github.com/sicarrots","followers_url":"https://api.github.com/users/sicarrots/followers","following_url":"https://api.github.com/users/sicarrots/following{/other_user}","gists_url":"https://api.github.com/users/sicarrots/gists{/gist_id}","starred_url":"https://api.github.com/users/sicarrots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sicarrots/subscriptions","organizations_url":"https://api.github.com/users/sicarrots/orgs","repos_url":"https://api.github.com/users/sicarrots/repos","events_url":"https://api.github.com/users/sicarrots/events{/privacy}","received_events_url":"https://api.github.com/users/sicarrots/received_events","type":"User","site_admin":false},"labels":[{"id":146833729,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Suggesters","name":":Suggesters","color":"009800","default":false},{"id":111624690,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/feedback_needed","name":"feedback_needed","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-27T22:31:41Z","updated_at":"2016-12-28T18:22:33Z","closed_at":"2016-12-28T18:22:33Z","body":"**Elasticsearch version**:\r\n5.1.1\r\n**Plugins installed**:\r\nNo plugins\r\n**JVM version**:\r\njava version \"1.8.0_111\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_111-b14)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)\r\n**OS version**:\r\nDebian 8\r\n**Description of the problem including expected versus actual behavior**:\r\n3 nodes, two data nodes and one for communication with application without data.\r\nIndex has 3 shards (because in the near feature third data node will be added) with one replica per shard.\r\nCurrently index has about 1.6 mln docs, each document has ~100 fields with various content.\r\nField \"suggest_title\" is mapped as:\r\n```\r\n\"suggest_title\": {\r\n    \"type\" : \"completion\",\r\n     \"contexts\": [{\r\n         \"name\": \"public\",\r\n         \"type\": \"category\",\r\n         \"path\": \"is_public\"\r\n    }]\r\n}\r\n```\r\nQuery `/prod-entity/entity/_search?_source_include=title,id` with body\r\n```\r\n{\r\n\t\"suggest\": {\r\n\t\t\"title-completion\" : {\r\n\t        \"prefix\" : \"war\",\r\n\t        \"completion\" : {\r\n\t            \"field\" : \"suggest_title\"\r\n\t        }\r\n\t    }\t\r\n\t}\r\n}\r\n```\r\nreturns expected results but after very huge amount of time and cpu usage:\r\n``` \r\n\"took\": 60727,\r\n\"timed_out\": false,\r\n\"_shards\": {\r\n    \"total\": 3,\r\n    \"successful\": 3,\r\n    \"failed\": 0\r\n}\r\n```\r\nExperiment with one primary shard and one replica with the same data with no results (query time slightly lower, but still a lot above expected).\r\nThe same setup using elasticseach 2.1.x (old completions with payloads) was running as expected (query times < 20ms), so this is a big regression."}}
{"actor":{"display_login":"jimczi"}}