Re: [Wildcard query] Weird behaviour

2010-12-03 Thread Robert Muir
On Fri, Dec 3, 2010 at 7:49 AM, Tanguy Moal  wrote:
> Thank you very much Robert for replying that fast and accurately.
>
> I have effectively an other idea in mind to provide similar
> suggestions less expansively, I was balancing between the work around
> and the report issue options.
>
> I don't regret it since you came with a possible fix. I'll give it a
> try as soon as possible, and let the list know.

I'm afraid the patch is only a hack for the case where you have more
than 1 * sequentially (e.g. foobar).
It doesn't fix the more general problem, which is that WildcardQuery
itself uses an inefficient algorithm: this more general problem is
only fixed in lucene/solr trunk.

If you really need these queries i definitely suggest at least trying
trunk, because you should get much better performance.

But it sounds like you might already have an idea to avoid using these
queries so this is of course the best.


Re: [Wildcard query] Weird behaviour

2010-12-03 Thread Tanguy Moal
Thank you very much Robert for replying that fast and accurately.

I have effectively an other idea in mind to provide similar
suggestions less expansively, I was balancing between the work around
and the report issue options.

I don't regret it since you came with a possible fix. I'll give it a
try as soon as possible, and let the list know.

Regards,

Tanguy

2010/12/3 Robert Muir :
> Actually, i took a look at the code again, the queries you mentioned:
> "I send queries to that field in the form (*term1*term2*)"
>
> I think the patch will not fix your problem... The only way i know you
> can fix this would be to upgrade to lucene/solr trunk, where wildcard
> comparison is linear to the length of the string.
>
> In all other versions, it has much worse runtime, and thats what you
> are experiencing.
>
> Separately, even better than this would be to see if you can index
> your content in a way to avoid these expensive queries. But this is
> just a suggestion, what you are doing should still work fine.
>
> On Fri, Dec 3, 2010 at 6:56 AM, Robert Muir  wrote:
>> On Fri, Dec 3, 2010 at 6:28 AM, Tanguy Moal  wrote:
>>> However suddenly CPU usage simply doubles, and sometimes eventually
>>> start using all 16 cores of the server, whereas the number of handled
>>> request is pretty stable, and even starts decreasing because of
>>> degraded user experience due to dramatic response times.
>>>
>>
>> Hi Tanguy: This was fixed here:
>> https://issues.apache.org/jira/browse/LUCENE-2620.
>>
>> You can apply the patch file there
>> (https://issues.apache.org/jira/secure/attachment/12452947/LUCENE-2620_3x.patch)
>> and recompile your own lucene 2.9.x, or you can replace the lucene jar
>> file in your solr war with the newly released lucene-2.9.4 core jar...
>> which I think is due to be released later today!
>>
>> Thanks for spending the time to report the problem... let us know the
>> patch/lucene 2.9.4 doesnt fix it!
>>
>


Re: [Wildcard query] Weird behaviour

2010-12-03 Thread Robert Muir
Actually, i took a look at the code again, the queries you mentioned:
"I send queries to that field in the form (*term1*term2*)"

I think the patch will not fix your problem... The only way i know you
can fix this would be to upgrade to lucene/solr trunk, where wildcard
comparison is linear to the length of the string.

In all other versions, it has much worse runtime, and thats what you
are experiencing.

Separately, even better than this would be to see if you can index
your content in a way to avoid these expensive queries. But this is
just a suggestion, what you are doing should still work fine.

On Fri, Dec 3, 2010 at 6:56 AM, Robert Muir  wrote:
> On Fri, Dec 3, 2010 at 6:28 AM, Tanguy Moal  wrote:
>> However suddenly CPU usage simply doubles, and sometimes eventually
>> start using all 16 cores of the server, whereas the number of handled
>> request is pretty stable, and even starts decreasing because of
>> degraded user experience due to dramatic response times.
>>
>
> Hi Tanguy: This was fixed here:
> https://issues.apache.org/jira/browse/LUCENE-2620.
>
> You can apply the patch file there
> (https://issues.apache.org/jira/secure/attachment/12452947/LUCENE-2620_3x.patch)
> and recompile your own lucene 2.9.x, or you can replace the lucene jar
> file in your solr war with the newly released lucene-2.9.4 core jar...
> which I think is due to be released later today!
>
> Thanks for spending the time to report the problem... let us know the
> patch/lucene 2.9.4 doesnt fix it!
>


Re: [Wildcard query] Weird behaviour

2010-12-03 Thread Robert Muir
On Fri, Dec 3, 2010 at 6:28 AM, Tanguy Moal  wrote:
> However suddenly CPU usage simply doubles, and sometimes eventually
> start using all 16 cores of the server, whereas the number of handled
> request is pretty stable, and even starts decreasing because of
> degraded user experience due to dramatic response times.
>

Hi Tanguy: This was fixed here:
https://issues.apache.org/jira/browse/LUCENE-2620.

You can apply the patch file there
(https://issues.apache.org/jira/secure/attachment/12452947/LUCENE-2620_3x.patch)
and recompile your own lucene 2.9.x, or you can replace the lucene jar
file in your solr war with the newly released lucene-2.9.4 core jar...
which I think is due to be released later today!

Thanks for spending the time to report the problem... let us know the
patch/lucene 2.9.4 doesnt fix it!