Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Solr, mail # user - Question on writing custom UpdateHandler


Copy link to this message
-
Re: Question on writing custom UpdateHandler
Chris Hostetter 2011-03-01, 18:17

In your first attempt, the crux of your problem was probably that you were
never closing the searcher/reader.

: Or how can I perform a query on the current state of the index from within an
: UpdateProcessor?

If you implement UpdateRequestProcessorFactory, the getInstance method is
given the SolrQueryRequest, which you cna use to access the current
SolrIndexSearcher.

this will only show you the state of the index as of the last commit, so
it won't be real time as you are streaming new documents, but if will give
you the same results as a search query happening concurrent to your
update.
-Hoss