See below:

On Wed, May 18, 2011 at 8:15 AM, Jason, Kim <hialo...@gmail.com> wrote:
> Hi, all
>
> I have two questions.
> First,
> I'm wondering how filterCache, queryResultCache, documentCache are applied.
> After searching query1  OR query2 OR query3 ... , I searched query0  OR
> query2 OR query3 ... .
> Just query1 and query0 are difference.
> But query time was not fast.
> When are the caches applied?
>

Caches don't really count here. You're not using filter queries so
filterCache isn't
germane. documentCache is only for holding the document read off disk,
it probably
isn't doing much in your example that would impact differences in search
time unless you're returning massive numbers of documents.

queryResultCache isn't getting re-used. Think of this as a list of document IDs
keyed by the *entire* query. by making any changes to the query you're not
going to use the cache. To understand this, consider that the clauses aren't
really separate. Any additional clause could easily change the scoring of
a document that matched both queries. So re-using the cache on a "by clause"
basis wouldn't produce correct results.

In other words, caches aren't going to help you here.

> Second,
> I have 5 or more phrase queries included wildcard per query such as "query1*
> query2*"~2 OR "query3* query4*"~2 ...
> In the worst case, phrase queries included wildcard in one query are more
> than 30.
> QTime is more than 60 second.
>

Can we see the results of attaching &debugQuery=on to the URL?
your pseudo-code may well be hiding the issue. We don't know what
query parser you're using. Wildcards aren't usually analyzed for phrase
queries for instance, so on the face of it there's not much that can be said...

Additionally, the field type and field definitions from your schema.xml
would be helpful for the fields you're searching on.

Best
Erick

> Please give any idea to improve performance.
>
> I have 2.5 million full text index.
> That is running 10 shards on 1 tomcat.
>
> Thanks,
> Jason
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/how-to-work-cache-and-improve-performance-phrase-query-included-wildcard-tp2956671p2956671.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to