lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vanlerberghe, Luc" <>
Subject RE: IndexSearcher in servlet containers
Date Wed, 05 Oct 2005 13:35:40 GMT
Take a look at the DelayCloseIndexSearcher I contributed yesterday.

You should set up a SearcherFactory in an object that implements
ServletContextListener that receives webapp startup/shutdown events and
your servlets should get an IndexSearcher from that factory, use it and
then close it (as if it was a normal IndexSearcher instance)

There's an example of a simple SearcherFactory in the javadoc.  I'll
perhaps post a more performant version later on based on what I am (or
rather will be) using in production.


-----Original Message-----
From: Cyril Barlow [] 
Sent: woensdag 5 oktober 2005 15:15
Subject: IndexSearcher in servlet containers

Has anyone got experience of using the IndexSearcher in a servlet? I'm
having caching problems when there's a lot of different concurrent users
with the current setup. Currently the setup is to create a IndexSearcher
per servlet doPost call and close it after. But with concurrent requests
- especially ones which are performing fairly complex ranked boolean
queries that take a few seconds are causing caching problems - sometimes
a completely different set of results will be returned or nothing at
all. Has anyone come across errors like these before or know best
practices for searching in concurrent servlets?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message