java-user@lucene.apache.org
[Top] [All Lists]

Caching analyzed query

Subject: Caching analyzed query
From: Erdinc Yilmazel
Date: Thu, 3 Dec 2009 01:43:02 +0000
Hi,

In my application certain kind of queries for certain kinds of inputs will
be repeated on the lucene index. The application flow is something like
this:

   1. Get input A
   2. Lookup a key/value store for key A
   3. Load a text from key value store to be used as a query
   4. Analyze the text and build a Query object
   5. Perform a search

What I want to do is to implement a cache for the steps 2, 3 and 4. I don't
want to analyze the query text again and again. Think of this as a
distributed application, running on several servers. What is the best way to
cache analyzed version of the input text? I can make a cache per JVM by
holding a previously created Query object for a specific input, but in a
distributed environment if I store the serialized form of Query object, the
overhead of deserializing may kill all the benefits of caching here...

Thanks,
Erdinc
<Prev in Thread] Current Thread [Next in Thread>