Hi -

On 4/23/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:

On 4/23/07, Jennifer Seaman <[EMAIL PROTECTED]> wrote:
> When there is no "q" Solr complains. How can I browse a facet without
> a keyword query? For example, I want to view all document for a given
state;
>
> ?q=&fq=state:California

With a relatively recent nightly build, you can use q=*:*
Before that, use an open-ended range query like q=state:[* TO *]


I was doing the q=state[* TO *] for a short time, and found it very slow. I
switched to doing a query on a single field that covered the part of the
index I was interested in, for example:

inStock:true

And got much faster performance. I was getting execution times in seconds
(for example, I just manually did this and got. 2.2 seconds for the [* TO
*], and 50 milliseconds for the latter (inStock:true), uncached)

In my case the filter query hits about 80% of the docs, so it's doing a
similar amount of work. I don't know how well *:* performs, but if it is
similar to state:[* TO *], I would benchmark it before using.

For us, facet queries are a high percentage, so the time was critical. It
might even be worth adding a field, if you don't already have an appropriate
one.

Tom

Reply via email to