Getting real-time field values in Lucene by Mike McCandless.
From the post:
We know Lucene’s near-real-time search is very fast: you can easily refresh your searcher once per second, even at high indexing rates, so that any change to the index is available for searching or faceting at most one second later. For most applications this is plenty fast.
But what if you sometimes need even better than near-real-time? What if you need to look up truly live or real-time values, so for any document id you can retrieve the very last value indexed?
Just use the newly committed
LiveFieldValues
class!It’s simple to use: when you instantiate it you provide it with your SearcherManager or NRTManager, so that it can subscribe to the
RefreshListener
to be notified when new searchers are opened, and then whenever you add, update or delete a document, you notify theLiveFieldValues
instance. Finally, call the get method to get the last indexed value for a given document id.
I saw a webinar by Mike McCandless that is probably the only webinar I would ever repeat watching.
Organized, high quality technical content, etc.
Compare that to a recent webinar I watched that spent fify-five (55) minutes reviewing information know to anyone who could say the software’s name. The speaker then lamented the lack of time to get into substantive issues.
When you see a webinar like Mike’s, drop me a line. We need to promote that sort of presentation over the other.