Or how can I perform a query on the current state of the index from
within an UpdateProcessor?
Thanks
On 2/25/11 6:30 AM, Mark wrote:
I am trying to write my own custom UpdateHandler that extends
DirectUpdateHandler2.
I would like to be able to query the current state of the index within
the addDoc method. How would I be able to accomplish this?
I tried something like the following but it was a big fat fail as it
quickly created an enormous amount of indexes files and I received a
"too many open files" exception.
/iwCommit.lock();
try {
openWriter();
docs = new IndexSearcher(writer.getReader()).search(query, MAX_DOCS);
} finally {
iwCommit.unlock();
}/
I'm guessing the call to new IndexSearcher is at fault but I'm unsure
of a way around this.
Thanks for your help!