lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven A Rowe <sar...@syr.edu>
Subject RE: search hits not returned until I stop and restart application
Date Mon, 21 Jun 2010 17:39:50 GMT
Andy, it sounds like you're doing the right thing.

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.

For example, what do you mean by "singleton"? (You mentioned this in reference to both IndexWriter
and IndexReader.)  Is it possible that some part of your code is maintaining a reference to
the original IndexReader instance and using it, rather than using the newly opened instance?

Steve

> -----Original Message-----
> From: andynuss [mailto:andrew_nuss@yahoo.com]
> Sent: Monday, June 21, 2010 1:29 PM
> To: java-user@lucene.apache.org
> Subject: RE: search hits not returned until I stop and restart application
> 
> 
> "So you gotta call commit() or close().  Once you've done that, you can
> reduce the (expensive) cost of opening a new IndexReader by calling
> reopen(): "
> 
> Steve,
> 
> I tried this, and I must have done something wrong.
> 
> After my document set was ingested, I called a function which (1) called
> the IndexWriter singleton commit() function, (2) then called the
> IndexReader singleton reopen() function (no arguments).  (My IndexReader
> is read only.) Still didn't find hits in that book.  Then I tried (3)
> creating a new IndexSearcher on top of this IndexReader and that also
> didn't help.
> 
> Wonder what I could be doing wrong.
> 
> Andy
> --
> View this message in context: http://lucene.472066.n3.nabble.com/search-
> hits-not-returned-until-I-stop-and-restart-application-
> tp911711p912096.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org

Mime
View raw message