Hi

Solr query parser has special handling for single asterisk * which is rewritten 
as a «MatchAllDocs» query, the same as *:*. So when you do ** you probably 
explicitly invoke the wildcard feature which enumerates all terms in the 
dictionary.
I don’t see what you are trying to achieve with the ** term in your query.
If I should guess, it is some automatic query generator code that somehow 
generates this by mistake?

Jan

> 4. mar. 2020 kl. 16:59 skrev Shreyas Kothiya 
> <shreyas.koth...@archivesocial.com>:
> 
> Thanks you for quick response.
> 
> we do use wild card searches. I am sorry if i have not asked my question 
> correctly. 
> 
> in SOLR if you search with consecutive asterisks [**]  does not like it and 
> cause high CPU. and does not return any result.
> 
> q= N*W* 154 ** underpass was converted to 
> key&q=((text:N*W*+OR+text:154+OR+text:**+OR+text:underpass))
> 
> After doing the testing in our lower environment it appears that it caused 
> because of consecutive asterisks in search term above. 
> I was able to reproduce it by just searching q=**
> 
> 
> 
> 
> 
> 
>> On Mar 3, 2020, at 10:50 PM, em...@yeikel.com wrote:
>> 
>> According to the documentation, the standard query parser uses asterisks to
>> do wild card searches[1]. If you do not need to do wildcard queries and what
>> you are trying to do is to use the asterisks as a search term, you should
>> escape it[2]
>> 
>> [1]
>> https://lucene.apache.org/solr/guide/6_6/the-standard-query-parser.html#TheS
>> tandardQueryParser-WildcardSearches
>> [2]
>> https://lucene.apache.org/solr/guide/6_6/the-standard-query-parser.html#TheS
>> tandardQueryParser-EscapingSpecialCharacters 
>> 
>> -----Original Message-----
>> From: Shreyas Kothiya <shreyas.koth...@archivesocial.com> 
>> Sent: Tuesday, March 3, 2020 11:43 AM
>> To: solr-user@lucene.apache.org
>> Subject: Solr Search cause high CPU with **
>> 
>> Hello
>> 
>> we are using SOLR 6.6. we recently noticed unusual CPU spike. while one of
>> customer did search with ** in query string.
>> 
>> we had customer who searched for following term
>> 
>> q = N*W* 154 ** underpass
>> 
>> it caused CPU to go above 80%. our normal range of CPU is around 20%.
>> I wanted to know few things.
>> 
>> 1. what does ** mean in SOLR search.
>> 2. Is there a bug filed already for this issue.
>> 
>> 
>> Please let me know if you need more information.
>> 
>> Thanks
>> Shreyas Kothiya
>> 
> 

Reply via email to