Setting the buffer and merge counts seems to break document addition
somehow. Here's the "crux" of my Lucene code:
IndexWriter writer = indexer.OpenWriter();
writer.SetMergeFactor(1000);
writer.SetMaxBufferedDocs(1000);
while (pageQueue.Count > 0)
{
List<Document> ld = indexer.BuildDocuments(page);
indexer.Remove(page.Id);
foreach (Document d in ld)
{
indexer.Add(d);
}
}
indexer.CloseWriter();
// Flush the deletions
indexer.ReopenReader();
Remove calls this:
_Reader.DeleteDocuments(new Term("Id", id.ToString()));
And add calls:
_Writer.AddDocument(d);
When I run through this, the remove works but the add does not seem to.
I built the index initially without a problem, but its these updates
that seem to be failing.