> 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 ? 
> 
I am not sure, what you mean with "multi-user"-scenario. Can you tell me
what you got in mind?
If your index never changes, your IndexSearcher won't change.




> 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 ? 
> 
I am not sure about the benefit of a static IndexSearcher. What do you
hope???

If user 1 uses  a filter like "fq=name:Samuel&q=somethingIWantToKnow" and
user 2 queries for "fq=name:Samuel&q=whatIReallyWantToKnow" than they use
the same cached filter-object, retrived from Solr's internal cache (of
course you need to have a cache-size that allows cacheing).



> 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. 
> 
Yes. If a new searcher is created than the new Cache is built on the old
one.



> Is this true for queryResultsCache, 
> filterCache and documentCache ? 
> 
For FilterCache it's true. For queryResultsCache (if I understand the wiki
right), too.
Please note, that the documentCache's behaviour is different from the
already mentioned ones. 
The wiki says:


> Note: This cache cannot be used as a source for autowarming because
> document IDs will change when anything in the index changes so they can't
> be used by a new searcher.
> 

The wiki says that the number of the document cache should not be bigger
than the number of _results_ * number of _concurrent_ queries.
I never worked with the document cache, so maybe someone else can throw some
light into the dark.
But from what I have understood it means the following:

If you show 10 results per request and you think of up to 500 concurrent
queries:
10 * 500 => 5000

But I want to emphasize, that this is only a gues. I actually don't exactly
know more about this topic.

Kind regards
- Mitch
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/IndexSearcher-and-Caches-tp833567p838367.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to