On 6/7/07, Michael Thessel <[EMAIL PROTECTED]> wrote:
I've got a problem with filtered queries. I have an index with about 8
million documents. I save a timestamp (not the time of indexing) for
each document as an integer field. Querying the index is pretty fast.
But when I filter on the timestamp the queries are extremely slow, even
if the unfiltered search is already cached.

Filters are cached independently of queries, but cached queries
consist of the sort *and* any applied filters.

INFO: /select/ rows=25&start=0&q=((title:(test)+AND+is_starter:true)^8
+OR+pagetext:(test)^6+OR+title_pagetext:(test)^4+);+score+desc&fl=
+score,postid&qt=standard&stylesheet=&version=2.1 0 5

INFO: /select/ rows=25&start=0&fq=dateline:[0+TO
+1181237598]+&q=((title:(test)+AND+is_starter:true)^8+OR
+pagetext:(test)^6+OR+title_pagetext:(test)^4+);+score+desc&fl=
+score,postid&qt=standard&stylesheet=&version=2.1 0 79495

I suspect that the endpoint to your dateline filter changes often,
hence caching is doing no good.  Is then endpoint (1181237598) derived
from the current time?
If so, there are some things you can do:
1) make it faster to generate a new filter by limiting the number of
terms in the dateline field (during indexing, always round it to the
nearest day)
2) allow solr to reuse previously generated filters more often by
rounding the dateline endpoint during query time.

You most likely want to do #2, and probably #1 (depending on how often
you commit new changes to the index).

-Yonik

Reply via email to