Marcelino - Give it a try with Lucene 2.4 - there is a tag in the SVN repository for it. If it still occurs, a stack trace with line numbers inside of Lucene would be helpful. You may want to remove your catch statement completely as you are just re-throwing the exception anyways and could be suppressing the source.
http://blogs.msdn.com/jmstall/archive/2007/02/07/catch-rethrow.aspx Michael -----Original Message----- From: Marcelino Ponty [mailto:marcelino_po...@yahoo.com] Sent: Thu 11/26/2009 12:51 PM To: lucene-net-user@incubator.apache.org Subject: Re: [ask] index out of range exceptions. Hi Michael! Thanks for your fast response! In the stack trace: at Lucene.Net.Index.DocumentsWriter.Abort(AbortException ae) at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm) at Lucene.Net.Index.DocumentsWriter.AddDocument(Document doc, Analyzer analyzer) at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer) at Lucene.Net.Index.IndexWriter.AddDocument(Document doc) at Atmalib.Lucene.Indexing.ExecuteIndexing(Directory dir) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\CreateIndex\CreateIndex\App_Code\Indexing.cs:line 95 I use Lucene.NET version 2.3.1.2. And my program is absolutely simple: //main program protected static void ExecuteIndexing(Directory dir) { IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(), true); try { string query = "select top 40000 * from v_simple_artikel"; //use public class method to query database SqlDataReader row = Atmalib.DataAccess.GetDataReaderFromQuery(query); //read query results and add document while (row.Read()) { Document doc = new Document(); doc.Add(new Field("kode_koleksi", row["kode_koleksi"].ToString(), Field.Store.YES, Field.Index.NO, Field.TermVector.NO)); doc.Add(new Field("kode_artikel", row["kode_artikel"].ToString(), Field.Store.YES, Field.Index.NO, Field.TermVector.NO)); //.... //adding many other fields //... Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); doc.Add(new Field("kata_kunci_jurnal", row["kata_kunci_jurnal"].ToString(), Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); writer.AddDocument(doc); } writer.Optimize(); } catch (Exception exp) { throw exp; } finally { writer.Close(); } } //end of main program I'll be very grateful if you can give me assistance. Thank you!! ________________________________ From: Michael Garski <mgar...@myspace-inc.com> To: lucene-net-user@incubator.apache.org Sent: Fri, November 27, 2009 2:51:19 AM Subject: Re: [ask] index out of range exceptions. Hi Marcelino, Can you provide tha stack trace from the exception and a code snippet/description of what you are doing when it is thrown along with the version of Lucene.net you are using? Michael On Nov 26, 2009, at 11:48 AM, "Marcelino Ponty" <marcelino_po...@yahoo.com> wrote: > Hi all! > > I'm a new user of Lucene.NET, but I have experience once in using Ferret > which is written in Ruby language. I've come to a problem and hope any of you > can help me. > > I'm going to index 50,000 doc, but it failed and give > > System.IndexOutOfRangeExceptions: Index was outside the bound of the array. > > I test with 30,000 doc and it succeed. I think this has something to do with > basic predefined parameters while setting up the indexing process which I > should have set, but I don't know which parameter it is and where should I > set it. Do you guys have any idea? I think the answer should be simple. In > Ferret, I didn't meet this problem. > > Thanks for any assistance! > Regards, > Marcelino Ponty > (Phone +62819 - 3223 54 84) > "Ad Maiorem Dei Gloriam" > >