Mitch,
Thank you for your response. A few follow up questions for clarification :

<<That means one IndexSearcher + its caches got a lifetime of one commit.>>
In my case, I have an index which will not be modified after creation. Does
this mean that in a multi-user scenario, I can have a static IndexSearcher
object that can be shared by multiple users ?

<<BTW: The IndexSearcher is threadsafe. So there is no problem with
concurrent usage.>>
If the IndexSearcher object is threadsafe, then only issues related to
concurrency are addressed. What about the case where the IndexSearcher is
static? User 1 logs in to the system, queries with the static IndexSearcher,
logs out; and then User 2 logs in to the system, queries with the same
static IndexSearcher, logs out. In this case, the users 1 and 2 are not
querying concurrently but one after another. Will the query information
(filters or any other data) of User 1 be retained when User 2 uses this ?

Understand your point about the filter cache but appreciate if you could
throw some light on how these caches are tied to the IndexSearcher object.
Pasting my initial question here :
The solr wiki states that the caches are per IndexSearcher object i.e if I
set my filterCache size to 1000 it means that 1000 entries can be assigned
for every IndexSearcher object. Is this true for queryResultsCache,
filterCache and documentCache ? For the document cache, the wiki states that
the value should be greater than (number of records) * (max number of
queries). If the document cache is also sized per IndexSearcher object, then
why do we need the (max number of queries) parameter in the formula ?

Thank you.

Regards
Rahul

On Fri, May 21, 2010 at 3:03 PM, MitchK <mitc...@web.de> wrote:

>
> Rahul,
>
> the IndexSearcher of Solr gets shared with every request within two
> commits.
> That means one IndexSearcher + its caches got a lifetime of one commit.
> After every commit, there will be a new one created.
>
> The cache does not mean, that they are applied automatically. They mean,
> that a filter from a query will be cached and whenever an user-query
> requieres the same filtering-criteria, they will use the cached filter
> instead of creating a new one on the fly.
>
> I.e: fq=inStock:true
> The result of this filtering-criteria gets cached one time. If another user
> asks again for a query with fq=inStock:true, Solr reuses the already
> existing filter.
> Since such filters are cached as byteVectors, they are not large.
> In this case it does not care for what the user is querying in his q-param.
>
> BTW: The IndexSearcher is threadsafe. So there is no problem with
> concurrent
> usage.
>
> Hope this helps???
>
> Kind regards
> - Mitch
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/IndexSearcher-and-Caches-tp833567p833841.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to