You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Woolf, Ross" <Ro...@BMC.com> on 2009/07/30 01:03:59 UTC

Problems with IndexWriter.commit()

I'm experiencing a problem/unexpected behavior with IndexWriter.commit().  I have an open IndexWriter and I am writing a lot of documents to the index (addDocument).  I call a commit() and the data is committed as expected, but now as I continue to write documents to the index I have lost all caching from the writer (I have kept the same writer open).  Every single addDocument thereafter is treated as if it were followed with a commit right after it and the indexing speed comes to a crawl.  

I'm assuming this is not expected behavior since the concept of commit is to allow doing commits while keeping the indexWriter open.  Is anyone aware of this problem?  Does anyone know how I can rectify it and allow addDocument's thereafter to processed using the indexWriter caching?  I am on Lucene 2.4.1.

Thanks,
Ross

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Problems with IndexWriter.commit()

Posted by Michael McCandless <lu...@mikemccandless.com>.
Phew :)  Thanks for bringing closure!

Mike

On Thu, Jul 30, 2009 at 3:57 PM, Woolf, Ross<Ro...@bmc.com> wrote:
> This turned out to be my own problem, but using infoStream helped me to discover where my problem was.
>
> Thanks
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Wednesday, July 29, 2009 6:11 PM
> To: java-user@lucene.apache.org
> Subject: Re: Problems with IndexWriter.commit()
>
> This is certainly not expected.
>
> Can you turn on IndexWriter's infoStream and post the result?
>
> Mike
>
> On Wed, Jul 29, 2009 at 7:03 PM, Woolf, Ross<Ro...@bmc.com> wrote:
>> I'm experiencing a problem/unexpected behavior with IndexWriter.commit().  I have an open IndexWriter and I am writing a lot of documents to the index (addDocument).  I call a commit() and the data is committed as expected, but now as I continue to write documents to the index I have lost all caching from the writer (I have kept the same writer open).  Every single addDocument thereafter is treated as if it were followed with a commit right after it and the indexing speed comes to a crawl.
>>
>> I'm assuming this is not expected behavior since the concept of commit is to allow doing commits while keeping the indexWriter open.  Is anyone aware of this problem?  Does anyone know how I can rectify it and allow addDocument's thereafter to processed using the indexWriter caching?  I am on Lucene 2.4.1.
>>
>> Thanks,
>> Ross
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Problems with IndexWriter.commit()

Posted by "Woolf, Ross" <Ro...@BMC.com>.
This turned out to be my own problem, but using infoStream helped me to discover where my problem was.

Thanks

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: Wednesday, July 29, 2009 6:11 PM
To: java-user@lucene.apache.org
Subject: Re: Problems with IndexWriter.commit()

This is certainly not expected.

Can you turn on IndexWriter's infoStream and post the result?

Mike

On Wed, Jul 29, 2009 at 7:03 PM, Woolf, Ross<Ro...@bmc.com> wrote:
> I'm experiencing a problem/unexpected behavior with IndexWriter.commit().  I have an open IndexWriter and I am writing a lot of documents to the index (addDocument).  I call a commit() and the data is committed as expected, but now as I continue to write documents to the index I have lost all caching from the writer (I have kept the same writer open).  Every single addDocument thereafter is treated as if it were followed with a commit right after it and the indexing speed comes to a crawl.
>
> I'm assuming this is not expected behavior since the concept of commit is to allow doing commits while keeping the indexWriter open.  Is anyone aware of this problem?  Does anyone know how I can rectify it and allow addDocument's thereafter to processed using the indexWriter caching?  I am on Lucene 2.4.1.
>
> Thanks,
> Ross
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Problems with IndexWriter.commit()

Posted by Michael McCandless <lu...@mikemccandless.com>.
This is certainly not expected.

Can you turn on IndexWriter's infoStream and post the result?

Mike

On Wed, Jul 29, 2009 at 7:03 PM, Woolf, Ross<Ro...@bmc.com> wrote:
> I'm experiencing a problem/unexpected behavior with IndexWriter.commit().  I have an open IndexWriter and I am writing a lot of documents to the index (addDocument).  I call a commit() and the data is committed as expected, but now as I continue to write documents to the index I have lost all caching from the writer (I have kept the same writer open).  Every single addDocument thereafter is treated as if it were followed with a commit right after it and the indexing speed comes to a crawl.
>
> I'm assuming this is not expected behavior since the concept of commit is to allow doing commits while keeping the indexWriter open.  Is anyone aware of this problem?  Does anyone know how I can rectify it and allow addDocument's thereafter to processed using the indexWriter caching?  I am on Lucene 2.4.1.
>
> Thanks,
> Ross
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org