: 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
if you have the filterCache enabled and you aren't opening new searchers very often, the open ended range query should results in a cached bitself just as good as something like inStock:true ... i think yonik just suggested it because if you are faceting on state then you can be confident that you are only interested in docs that have a state field. : 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) [* TO *] on the default field might be very slow (because it's iterating over all the terms) but on a field with a small number of discrete values (like state, or inStock) it should be very fast. : 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. *:* is implemented extremeley efficienlty ... it doesn't look at any term info, it just iterates over all the non-deleted docs. -Hoss