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
This commit is contained in:
Christoph Büscher 2019-08-08 21:05:28 +02:00
parent 0ae103c40f
commit a552b33276
1 changed files with 1 additions and 0 deletions

View File

@ -775,6 +775,7 @@ public class SuggestSearchIT extends ESIntegTestCase {
assertAcked(prepareCreate("test").setSettings(Settings.builder() assertAcked(prepareCreate("test").setSettings(Settings.builder()
.put(indexSettings()) .put(indexSettings())
.put(IndexSettings.MAX_SHINGLE_DIFF_SETTING.getKey(), 4) .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") .put("index.analysis.analyzer.suggest.tokenizer", "standard")
.putList("index.analysis.analyzer.suggest.filter", "lowercase", "shingler") .putList("index.analysis.analyzer.suggest.filter", "lowercase", "shingler")
.put("index.analysis.filter.shingler.type", "shingle") .put("index.analysis.filter.shingler.type", "shingle")