legacy-knowledge-base
Publicado Jun. 25, 2030

Unable to search with rupee or any other currency

written-by

Amit Tiwari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • Steps to reproduce:
    1. Create a sample web content with the rupee or any other currency symbol in the content.
    2. Try to search with just the currency symbol i.e. rupee or any other currency symbol.

    Expected Behaviour: Show the contents with the currency.
    Actual Behaviour: Showing no results found.

Environment

  • Liferay DXP U60

Resolution

  • This is an expected behavior. When using search analyzers certain words and characters are removed from indexing and/or searching. Most punctuation, including money symbols, are removed which you can see described under the Standard Analyzer in the Elasticsearch Documentation.

  • Liferay uses the Hindi analyzer for the Indian locale. If it's useful, tests can be done to see how the analyzer will tokenize text, for example, this is a Kibana query against a Liferay index:

    GET /liferay-20097/_analyze
    {
      "analyzer": "hindi",
      "text": "$500 ₹2000 600₹ dog's bone."
    }
    

    This will return "500", "2000", "600", "dog", and "bone", and will remove symbols and punctuation as expected.

  • The whitespace analyzer tokenizes the symbol and money together, for example, "₹100" as one term. So, you might need to create a custom analyzer for this requirement.

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base