Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to remove images from Liferay Search Results?
Hi,
I am using Liferay 7.2, DXP & CE both. Usually we keep files (extensions are pdf, doc, jpg, png) in Document and Media.
In search, getting all these as results if it is matched with the keyword.
Only I have to show pdf, doc but do not need to show the images(extension: jpg, png,etc.) in Liferay Search Results.
How can I achieve this?
Kindly guide me and provide suggestions regarding this.
Thanks in advance.
Regards,
Anuvab
I am using Liferay 7.2, DXP & CE both. Usually we keep files (extensions are pdf, doc, jpg, png) in Document and Media.
In search, getting all these as results if it is matched with the keyword.
Only I have to show pdf, doc but do not need to show the images(extension: jpg, png,etc.) in Liferay Search Results.
How can I achieve this?
Kindly guide me and provide suggestions regarding this.
Thanks in advance.
Regards,
Anuvab
Gopal Prasad Satapathy, modified 4 Years ago.
Junior Member
Posts: 51
Join Date: 3/29/18
Recent Posts
Hi,
Did you find any solution for this?
Thanks,
Gopal
I would likely attack this with the Custom Filter widget:
You could add a tag ("nosearch" maybe) to all the docs and media files you don't want to search, then use a Must Not match type in the custom filter widget to eclude them, for one approach.
You might a lso be able to target specific extensions with the custom filter widget, but I can't think off the top of my head how, exactly.
Edited to add: In 7.3 I did this by adding a Must_Not Match Query filter for "jpg" on the "extension" field:
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™