CheckIndex tool is in the 2.3 JAR. Just make sure the JAR is on your CLASSPATH then run:

  java org.apache.lucene.index.CheckIndex <indexDirectory>

However, from that stack trace, this is not a corruption issue in your existing index. My guess is you would hit this same exception if you started from a new index because it's being hit when flushing a new segment (not merging old ones).

How many documents are you adding before closing the writer? Are you using multiple threads to add documents? What kinds of documents are you adding?

Can you try disabling asserts, then try to build your index, then run CheckIndex on the resulting index? It's possible this is an over- aggressive assert.

I'll go scrutinize that code...

Mike

Sergey Kabashnyuk wrote:

stack trace
java.lang.AssertionError
at org.apache.lucene.index.TermInfosWriter.add (TermInfosWriter.java:143) at org.apache.lucene.index.DocumentsWriter.appendPostings (DocumentsWriter.java:2290) at org.apache.lucene.index.DocumentsWriter.writeSegment (DocumentsWriter.java:1985) at org.apache.lucene.index.DocumentsWriter.flush (DocumentsWriter.java:539) at org.apache.lucene.index.IndexWriter.doFlush (IndexWriter.java:2497) at org.apache.lucene.index.IndexWriter.flush (IndexWriter.java:2397) at org.apache.lucene.index.IndexWriter.closeInternal (IndexWriter.java:1204) at org.apache.lucene.index.IndexWriter.close (IndexWriter.java:1178) at org.apache.lucene.index.IndexWriter.close (IndexWriter.java:1153)

Where I can find CheckIndex.tool ?

Sergey Kabashnyuk


Can you provide the full stack trace, and any details of what you were doing when you tripped that assert?

Another thing to try is to run the org.apache.lucene.index.CheckIndex tool (new in 2.3) to check your 2.2 index. It's possible your 2.2 index has some undetected corruption which this new assert is detecting.

Mike

Sergey Kabashnyuk wrote:

Hi
I want to update  from lucene 2.2.0 to 2.3.0
but I have assert it TermInfosWriter line 143.

What is it mean
assert compareToLastTerm(fieldNumber, termText, termTextStart,
termTextLength) < 0 || (isIndex && termTextLength == 0 &&
lastTermTextLength == 0);

Can you help me?

Sergey Kabashnyuk

-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Отправлено M2, революционной почтовой программой Opera: http://www.opera.com/ mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to