Expand my Community achievements bar.

Decimal Value Full Text Lucene Search in AEM

Avatar

Level 2

Hi All,

 

We wanted to check if anybody has faced an issue with a decimal value search not working properly with Lucene in AEM. We observed that "." is taken up as "Space" by Lucene. Since it is not mentioned exclusively in the Apache Lucene documentation hence this behavior is odd when the search results are coming.

 

Example:

Searched Value -> "0.360"

Results -> Document which doesn't have 0.360 but has (35.0) 360

 

Could any body provide any insights on this issue.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Employee

This is the default product search behaviour. Any special character is replaced with space . You may try to search your product terms by putting it in double quotes but I am not too hopeful.

 

You may want to check index definition and how tokenization logic can be changed.

Avatar

Level 2

Hi @digarg17 ,

 

I have already tried with putting it in double quotes as stated in the example I posted in my comment but that is not working too. Moreover I checked the Apache Lucene official documentation and there "." is not a special character.

https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#-