lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhanlijun (JIRA)" <>
Subject [jira] [Comment Edited] (LUCENE-6037) PendingTerm cannot be cast to PendingBlock
Date Mon, 03 Nov 2014 04:00:34 GMT


zhanlijun edited comment on LUCENE-6037 at 11/3/14 3:59 AM:

I found the cause of the problem. 
I have a application scenario that add a same document to the index by using indexwriter.addDocuments().
In order to improve the efficiency of indexing, I make the document into a static variable.
 This way running very well in a single-threaded environment, however, when I use multiple-threads
to operator indexwriter.addDocuments(), it cause the error. 
The solution: I make a new document for each thread, and the error would no longer be reappeared.

was (Author: zhanlijun):
I used multiple threads to add a single document (static variable), and it would cause this
error.  After I corrected, the error would no longer be reappeared.

> PendingTerm cannot be cast to PendingBlock
> ------------------------------------------
>                 Key: LUCENE-6037
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs
>    Affects Versions: 4.3.1
>         Environment: ubuntu 64bit
>            Reporter: zhanlijun
>            Priority: Critical
>             Fix For: 4.3.1
> the error as follows:
> java.lang.ClassCastException: org.apache.lucene.codecs.BlockTreeTermsWriter$PendingTerm
cannot be cast to org.apache.lucene.codecs.BlockTreeTermsWriter$PendingBlock
>         at org.apache.lucene.codecs.BlockTreeTermsWriter$TermsWriter.finish(
>         at org.apache.lucene.index.FreqProxTermsWriterPerField.flush(
>         at org.apache.lucene.index.FreqProxTermsWriter.flush(
>         at org.apache.lucene.index.TermsHash.flush(
>         at org.apache.lucene.index.DocInverter.flush(
>         at org.apache.lucene.index.DocFieldProcessor.flush(
>         at org.apache.lucene.index.DocumentsWriterPerThread.flush(
>         at org.apache.lucene.index.DocumentsWriter.doFlush(
>         at org.apache.lucene.index.DocumentsWriter.postUpdate(
>         at org.apache.lucene.index.DocumentsWriter.updateDocuments(
>         at org.apache.lucene.index.IndexWriter.updateDocuments(
>         at org.apache.lucene.index.IndexWriter.addDocuments(
>         at org.apache.lucene.index.IndexWriter.addDocuments(

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message