Tests: Ensure termvector is not fetched from translog

Setting realTime to false in the get term vector request ensures,
that after a refresh the document is not fetched from the translog,
which seems to yield different in rare test runs.

The change likely triggering this was introduced in #15933
This commit is contained in:
Alexander Reelsen 2016-01-18 10:17:13 +01:00
parent 69b21feb3b
commit 2b0c036b99
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ public abstract class AbstractTermVectorsTestCase extends ESIntegTestCase {
protected TermVectorsRequestBuilder getRequestForConfig(TestConfig config) {
return client().prepareTermVectors(randomBoolean() ? config.doc.index : config.doc.alias, config.doc.type, config.doc.id).setPayloads(config.requestPayloads)
.setOffsets(config.requestOffsets).setPositions(config.requestPositions).setFieldStatistics(true).setTermStatistics(true)
.setSelectedFields(config.selectedFields);
.setSelectedFields(config.selectedFields).setRealtime(false);
}
protected Fields getTermVectorsFromLucene(DirectoryReader directoryReader, TestDoc doc) throws IOException {