lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Metral" <...@artsalliancelabs.com>
Subject Am I adding docs properly?
Date Thu, 12 Apr 2007 03:22:58 GMT
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.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message