lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Garski <>
Subject RE: [jira] Created: (LUCENENET-195) IndexWriter.Optimize(); return an exception
Date Mon, 12 Oct 2009 18:39:31 GMT

What is the stack trace on that exception?  That will help point to where in the optimize
process the issue is occurring.

I noticed similar behavior during an optimization on a large index on 1.9 & 2.0 only when
term vectors were enabled.  As I didn't really need term vectors I disabled them and then
everything was fine.  With version 2.3 and beyond I have not encountered any issues during
an optimize when term vectors were enabled (we use them for faceting and a few other things).
 I'd suggest going with a newer version of Lucene.Net in a test environment to see if it is
reproducible there.


-----Original Message-----
From: Sérgio Araújo (JIRA) [] 
Sent: Monday, October 12, 2009 9:52 AM
Subject: [jira] Created: (LUCENENET-195) IndexWriter.Optimize(); return an exception

IndexWriter.Optimize(); return an exception

                 Key: LUCENENET-195
             Project: Lucene.Net
          Issue Type: Bug
         Environment: Framework 1.1 .NET
            Reporter: Sérgio Araújo

We are using the Lucene search engine a couple of months, on the first approach seems a very
good and high-performance engine.

We are using the your ""API version 

We have an index with 20GB approximately, all hours are added news docs to index and a time
per day the optimization is done at 9 pm.

During a couple of days everything ran fine even a day that optimization process "writer.Optimize();"
return the following exception:

"Source array was not long enough. Check srcIndex and length, and the array´s lower bounds."

Here you can find some parts of my code:

Document doc; doc = null;
IndexWriter writer; writer = null;
writer = new IndexWriter(strArticleIndexFolder, new StandardAnalyzer(), isNew);


foreach (ArticleIndexFull objArticleIndex in lstArticleIndexFull)
doc = new Document();
Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.YES));
Field.Index.TOKENIZED, Field.TermVector.YES));
Field.Index.TOKENIZED, Field.TermVector.YES));


if (System.DateTime.Now.Hour == 21)

If we migrate to last version available in this case the 2.4.3 my problem will be fixed?
Has my code any kind of problem?

We will appreciate your help.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message