You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sammy Yu <te...@gmail.com> on 2009/03/10 17:37:46 UTC

Query Performance of -field:[* TO *]

Hi guys,
    I'm trying to limit the size of my index and one of the things I
have done is to not populate certain fields when the majority of the
document have that value.  For example, if most of my documents in my
index have a field color which has the value green I will not populate
that field.  Only if it's another color will I will populate the
field.

My question is if I try to make a query such as -color:[* TO *] will
it be much slower than -color:green?  Thanks for your help in advance.

Best,
Sammy Yu

Re: Query Performance of -field:[* TO *]

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Mar 10, 2009 at 11:37 AM, Sammy Yu <te...@gmail.com> wrote:
> Hi guys,
>    I'm trying to limit the size of my index and one of the things I
> have done is to not populate certain fields when the majority of the
> document have that value.  For example, if most of my documents in my
> index have a field color which has the value green I will not populate
> that field.  Only if it's another color will I will populate the
> field.
>
> My question is if I try to make a query such as -color:[* TO *] will
> it be much slower than -color:green?  Thanks for your help in advance.

It depends on the number of terms in the field.  For colors, the
number of unique terms will be low, so no it won't really be slower.

-Yonik
http://www.lucidimagination.com