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 Aleksey Vorona <av...@ea.com> on 2012/11/20 00:46:04 UTC

All-wildcard query performance

Hi,

Our application sometimes generates queries with one of the constraints:
     field:[* TO *]

I expected this query performance to be the same as if we omitted the 
"field" constraint completely. However, I see the performance of the two 
queries to differ drastically (3ms without all-wildcard constraint, 
200ms with it).

Could someone explain the source of the difference, please?

I am fixing the application not to generate such queries, obviously, but 
still would like to understand the logic here. We use Solr 3.6.1. Thanks.

-- Aleksey

Re: All-wildcard query performance

Posted by Shawn Heisey <so...@elyograg.org>.
> Hi,
>
> Our application sometimes generates queries with one of the constraints:
>      field:[* TO *]
>
> I expected this query performance to be the same as if we omitted the
> "field" constraint completely. However, I see the performance of the two
> queries to differ drastically (3ms without all-wildcard constraint,
> 200ms with it).
>
> Could someone explain the source of the difference, please?
>
> I am fixing the application not to generate such queries, obviously, but
> still would like to understand the logic here. We use Solr 3.6.1. Thanks.

That query does not mean all docs. It means something slightly different -
all documents for which "field" is present. If this field happens to exist
in every document, then it amounts to the same thing, but Solr still must
check every document.

Thanks,
Shawn