Legacy Knowledge Base
Published Jun. 30, 2025

Search results are incorrect with some keywords

Written By

Kanchan Bisht

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Search results are not correct with the type facet
  • Steps to reproduce:
    1) Create 4-5 web contents with the following titles just for testing purposes:
    Content for testing
    Content-on
    Content-in
    Content-or
    Content-to
    2) Create two content pages
    Page for information 
    Page for testing
    3) Now, create a new site with one content page.
    4) On this content page, add 'Type Facets', 'Search Bar', 'Search Results'
    5) Select 'Search Bar' and set scope 'Everything' from 'this Site'
    6) Select 'Type Facets' and choose only page and web content articles.
    7) Publish this page.
    Expected Behavior: When searching for any keyword from 'on', 'in', 'for', 'in', or 'to', the corresponding web content should return.
    Observed Behavior: When users search for any keyword, they only get pages, not web content.

Environment

  • Liferay DXP 7.4 update 31

Resolution

Additional Information

  • Assets will have slightly different search behavior. This is because of two general reasons, first that some assets are localized (and therefore utilize analyzers) and some are not. (Web Content is localized but Documents are not). The second reason is each asset is considered within its context when tuning how searchable the asset is. Because of these reasons, there are differences between the search results between assets.
  • Related: No results are returned when searching for a specific term because it is a Elasticsearch stopword
Did this article resolve your issue ?

Legacy Knowledge Base