Skip to content

Commit a552b33

Browse files
author
Christoph Büscher
committed
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
1 parent 0ae103c commit a552b33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ public void testEmptyShards() throws IOException, InterruptedException {
775775
assertAcked(prepareCreate("test").setSettings(Settings.builder()
776776
.put(indexSettings())
777777
.put(IndexSettings.MAX_SHINGLE_DIFF_SETTING.getKey(), 4)
778+
.put("index.refresh_interval", -1) // prevents occasional scoring glitches due to multi segments
778779
.put("index.analysis.analyzer.suggest.tokenizer", "standard")
779780
.putList("index.analysis.analyzer.suggest.filter", "lowercase", "shingler")
780781
.put("index.analysis.filter.shingler.type", "shingle")

0 commit comments

Comments
 (0)