You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Stephen Duncan Jr <st...@gmail.com> on 2010/06/22 15:38:53 UTC

How to wait for StreamingUpdateSolrServer to finish?

I'm prototyping using StreamingUpdateSolrServer.  I want to send a commit
(or optimize) after I'm done adding all of my docs, rather than wait for the
autoCommit to kick in.  However, since StreamingUpdateSolrServer is
multi-threaded, I can't simply call commit when I'm done, because that can
happen before the StreamingUpdateSolrServer actually sends all the docs.  I
would think that calling the method blockUntilFinished() before issuing the
commit would do the trick, but I still get my commit sent before the last
document is sent.  I've tried this with both Solr 1.4.0 and the latest
release candidate for Solr 1.4.1.  Has anybody else had this experience?
 Should I file a bug on blockUntilFinished()?

-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: How to wait for StreamingUpdateSolrServer to finish?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Jun 22, 2010 at 9:38 AM, Stephen Duncan Jr
<st...@gmail.com> wrote:
> I'm prototyping using StreamingUpdateSolrServer.  I want to send a commit
> (or optimize) after I'm done adding all of my docs, rather than wait for the
> autoCommit to kick in.  However, since StreamingUpdateSolrServer is
> multi-threaded, I can't simply call commit when I'm done, because that can
> happen before the StreamingUpdateSolrServer actually sends all the docs.  I
> would think that calling the method blockUntilFinished() before issuing the
> commit would do the trick, but I still get my commit sent before the last
> document is sent.  I've tried this with both Solr 1.4.0 and the latest
> release candidate for Solr 1.4.1.  Has anybody else had this experience?
>  Should I file a bug on blockUntilFinished()?

Yes, please do file a bug.
IMO, if someone does adds followed by a commit, that commit should
always effectively include the adds.

-Yonik
http://www.lucidimagination.com

Re: How to wait for StreamingUpdateSolrServer to finish?

Posted by Stephen Duncan Jr <st...@gmail.com>.
On Tue, Jun 22, 2010 at 9:38 AM, Stephen Duncan Jr <stephen.duncan@gmail.com
> wrote:

> I'm prototyping using StreamingUpdateSolrServer.  I want to send a commit
> (or optimize) after I'm done adding all of my docs, rather than wait for the
> autoCommit to kick in.  However, since StreamingUpdateSolrServer is
> multi-threaded, I can't simply call commit when I'm done, because that can
> happen before the StreamingUpdateSolrServer actually sends all the docs.  I
> would think that calling the method blockUntilFinished() before issuing the
> commit would do the trick, but I still get my commit sent before the last
> document is sent.  I've tried this with both Solr 1.4.0 and the latest
> release candidate for Solr 1.4.1.  Has anybody else had this experience?
>  Should I file a bug on blockUntilFinished()?
>
> --
> Stephen Duncan Jr
> www.stephenduncanjr.com
>

Is everyone using StreamingUpdateSolrServer relying on autocommit?

-- 
Stephen Duncan Jr
www.stephenduncanjr.com