From a552b33276590adb756859990a4724788bbba2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Thu, 8 Aug 2019 21:05:28 +0200 Subject: [PATCH] Fix occasional SuggestSearchIT failure (#45330) Refreshes happening during indexing can result differen segment counts and slightly skewed term statistics, which in turn has the potential to change suggestion output slightly. In order to prevent this, disable refresh for the affected tests. Closes #43261 --- .../java/org/elasticsearch/search/suggest/SuggestSearchIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java b/server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java index 22c19765fed..a751ec4b065 100644 --- a/server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java +++ b/server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java @@ -775,6 +775,7 @@ public class SuggestSearchIT extends ESIntegTestCase { assertAcked(prepareCreate("test").setSettings(Settings.builder() .put(indexSettings()) .put(IndexSettings.MAX_SHINGLE_DIFF_SETTING.getKey(), 4) + .put("index.refresh_interval", -1) // prevents occasional scoring glitches due to multi segments .put("index.analysis.analyzer.suggest.tokenizer", "standard") .putList("index.analysis.analyzer.suggest.filter", "lowercase", "shingler") .put("index.analysis.filter.shingler.type", "shingle")