How to eliminate irrelevant characters from search results?
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
- The Liferay out-of-the-box feature has been used to display search results on a page. Each record of the results displays the document title, the first few sentences in the document, and a few other metadata attributes. In a few instances, the search results are displaying junk characters instead of displaying the first few sentences. The documents are PDF files. As per the observation, the junk characters are due to the image in the document. Hence, is there any resolution to display only text and exclude images?
Steps to Reproduce:
1) Upload the pdf file to documents and media
2) Sign out and search that file (for example: '7' in this case)
3) Observe the Junk Characters in search results.
Expected behavior: There should be no junk characters in the search results
Actual Behavior: There are junk characters in the search results
Environment
- Liferay DXP 7.2 Fix Pack 10
Resolution
- This exact use case is not achievable in Liferay because it is handled by a third-party library, and there is no OOTB functionality to meet this requirement.
Did this article resolve your issue ?