Fix TestPendingSoftDeletes.

This commit is contained in:
Adrien Grand 2018-05-14 15:29:42 +02:00
parent a0acc63d02
commit 02849fb707
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ public class TestPendingSoftDeletes extends TestPendingDeletes {
public void testDeleteSoft() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig().setSoftDeletesField("_soft_deletes"));
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig()
.setSoftDeletesField("_soft_deletes")
// make sure all docs will end up in the same segment
.setMaxBufferedDocs(10)
.setRAMBufferSizeMB(IndexWriterConfig.DISABLE_AUTO_FLUSH));
Document doc = new Document();
doc.add(new StringField("id", "1", Field.Store.YES));
writer.softUpdateDocument(new Term("id", "1"), doc,