Decimal Value Full Text Lucene Search in AEM | Community
Skip to main content
Level 2
January 10, 2025

Decimal Value Full Text Lucene Search in AEM

  • January 10, 2025
  • 1 reply
  • 611 views

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.

1 reply

Level 2
January 13, 2025

@kautuk_sahni Could you please help here?

Adobe Employee
January 13, 2025

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.

Level 2
January 13, 2025

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#-