It's the same in both cases:
enumerate all terms that start with "a" and collect them into
(conceptually) a huge OR query and execute it. There's been some work
lately to avoid the TooManyBooleanClauses exception, but it's still
the case that every term starting with "a" has to be examined and
either added to the terms to be searched or not.

Best,
Erick

On Fri, Jul 21, 2017 at 11:34 AM, Saurabh Sethi
<saurabh.se...@sendgrid.com> wrote:
> I have a question in terms of how solr/lucene will lookup terms from
> postings list for the below two queries:
>
> 1. a*
> 2. a*gh
>
> My understanding is that for first, it will get all terms starting with 'a'
> and issue query on those terms.
> For second, it will again get all terms starting with 'a', then remove
> those then do not end with 'gh' and issue query on remaining terms.
>
> Please let me know if my understanding is correct. And if not, what am I
> missing?
>
> I am trying to do some optimization based on above assumption, that both
> these queries will behave differently.
>
> Thanks,
> Saurabh

Reply via email to