You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by zhoucheng2008 <zh...@gmail.com> on 2012/08/16 03:27:14 UTC

Why does this query slow down Lucene?

Hi,


I have the string "$21 a Day Once a Month" to search on a large index. 


I escape the $ sign, and the query string looks like:


+level:0 +(title:21 title:a title:day title:once title:a title:month) release_year:1941 code:movieverycd126087


This slows down Lucene. Any idea?


Thanks,
Cheng

Re: Why does this query slow down Lucene?

Posted by Trejkaz <tr...@trypticon.org>.
On Thu, Aug 16, 2012 at 11:27 AM, zhoucheng2008 <zh...@gmail.com> wrote:
>
> +(title:21 title:a title:day title:once title:a title:month)

Looks like you have a fairly big boolean query going on here, and some
of the terms you're using are really common ones like "a".

Are you using AND or OR for the default operator? I think AND was
significantly faster.

I would also consider culling stop words to get things like "a" out of
the picture.

I also find it interesting that Lucene doesn't normalise title:a
title:a to title:a^2 or something. :)

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Why does this query slow down Lucene?

Posted by Li Li <fa...@gmail.com>.
how slow is it? are all your searches slow or only that query slow? how
many docs are indexed and the size of the indexes? whats the hardware
configuration?
you should describe it clearly to get help.
在 2012-8-16 上午9:28,"zhoucheng2008" <zh...@gmail.com>写道:

> Hi,
>
>
> I have the string "$21 a Day Once a Month" to search on a large index.
>
>
> I escape the $ sign, and the query string looks like:
>
>
> +level:0 +(title:21 title:a title:day title:once title:a title:month)
> release_year:1941 code:movieverycd126087
>
>
> This slows down Lucene. Any idea?
>
>
> Thanks,
> Cheng