lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven A Rowe <>
Subject RE: search hits not returned until I stop and restart application
Date Mon, 21 Jun 2010 19:15:23 GMT

I think batching commits either by time or number of documents is common.

Do you know about NRT (Near Realtime Search)?: <>.
 Using IndexWriter.getReader(), you can avoid commits altogether, as well as reducing update->search
latency.  See IndexWriter.getReader() javadocs for more details: <>.

Depending on requirements, these two strategies can be combined.


> -----Original Message-----
> From: andynuss []
> Sent: Monday, June 21, 2010 2:44 PM
> To:
> Subject: RE: search hits not returned until I stop and restart application
> "Maybe you aren't using the IndexReader instance returned by reopen(), but
> instead are continuing to use the instance on which you called reopen()?
> It's tough to figure this kind of thing out without looking at the code."
> That was it, I was not using the newly (re)opened index.  By the way, one
> last question.  It doesn't matter for this because I'm indexing one huge
> document at a time, and then committing.  But later, I will also be
> indexing very small documents frequently.  In that case, it would seem
> that if I index a very small document, I don't want to be thrashing with a
> commit after each one, and then a reopen of the reader and reconstruction
> of my searcher.  Do others manage this type of thing with a thread that
> fires at intervals to commit if dirty?
View raw message