lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: How to create a Lucene in-memory index at webapp deployment time
Date Fri, 07 Sep 2012 09:17:41 GMT
You can do stuff with scopes and contexts and web.xml and whatever
(google something like tomcat application scope).  Or use some static
classes or singletons to look after the single index.


On Fri, Sep 7, 2012 at 6:10 AM, Kasun Perera <> wrote:
> I have a web java/jsp application running on Apache Tomcat server. In this
> web application I have used lucene, to index and calculate similrarity
> between some PDF documents(PDF documents are in the database). My live
> server dosent allow web-app to access files, so I have created the
> in-memory lucene index using RAMDirectory class.
> In the current way that I have coded in my application, when for each time
> user access the lucene involved functionality, it creates a new in-memory
> index.
> Is there any way to create the in-memory index at the webapp deployment
> time, so that in-memory index will be created only once and I can access
> in-memory index as long as web app is live?
> --
> Regards
> Kasun Perera

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

View raw message