incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: [lucy-user] index and search words separated by hyphens
Date Sun, 10 Jul 2011 04:00:25 GMT
On Fri, Jul 08, 2011 at 11:08:50AM +0200, arjan wrote:
> I used an external script to see if the new message was in Kino in the  
> right way. In the external script, the object was freshly instantiated.  
> In the main program however, it was not, and because - as the  
> documentation says - "IndexSearchers operate against a single  
> point-in-time view or Snapshot of the index", I searched the Index as it  
> was before my changes. Now I added a call to $env->clear_searcher to  
> reinstantiate the searcher and it works.

Thank you for making the effort to write up an accurate post-mortem.

The point-in-time view of the index is a sane and appropriate interface for
Searcher.  If Searcher updated itself, then users would have to wrap
transaction guards around every non-atomic sequence of method calls.  Given
Lucy's highly modularized design (where Searchers are often held as member
variables within other components), that's impractical.

Nevertheless, you aren't the first to be tripped up by that behavior and you
won't be the last.

At some point we should create some "troubleshooting" documentation, and
verifying that the Searcher has been properly refreshed will definitely be
on the checklist.


Marvin Humphrey

View raw message