lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Egor Pahomov <pahomov.e...@gmail.com>
Subject Sub-query cache.
Date Sun, 15 Jul 2012 14:09:18 GMT
    Hello, I has next problem: I process original user query and get a big
amount of unique queries. But parts of this queries are not unique. So I
want to be able to cache part of query. My question is how I should
implement it and would it be very difficult? I've got couple ideas. I have
cache in SolrIndexSearcher like any other cache and pass it to query. The
question is how to pass. One option is to build all query from specific
CachingQuery,in case you want some part of it to be cached. So every query
node would be doubled with CachingQuery covering it.
CachingQuery constructor would  receive arg telling, if this exact node
should be cached. CachingQuery would have method registerCache() which
would be used from SolrIndexSearcher to register cache. registerCache()
would pass this cache to all child nodes, so they can use this cache.
Important, that you have to use Caching query from the head of tree up to
the part you want to cache. Is this all make sense, or there is a better
solution?

Egor Pakhomov.

Mime
View raw message