RE: Exclude users (or anything else) from 7.2 search results

Yannik Horndt, modified 5 Years ago. New Member Posts: 9 Join Date: 1/31/19 Recent Posts
Hi Everyone,
After searching through the docs and google yesterday, I'm back again.
Coming to dxp 7.2, obviously the search has changed dramatically. I want to exclude users as a result from a search.
So when I type "test", I don't want to receive users as a result. Content created by "test" is fine.
I've removed the user model from Control Panel-Configuration-System administration-Search.
Is there anything else I need to do? Because that didn't do anything visible for me.
Thanks!
thumbnail
Jorge Díaz, modified 5 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Hi Yannik,
About:
I've removed the user model from Control Panel-Configuration-System administration-Search.
I don't think it is a good idea, user administration in control panel queries Elasticsearch, so perhaps it won't work in case you filter the User model from search functionality.
The easiest way is to add a type facet widget to your search result page, see: https://help.liferay.com/hc/es/articles/360029133851-Facets  this facet will filter all entities that are not selected in its configuration
If you don't want final users to see the facet widget and convert it in a filter applied by the admin users, just edit its permission and hide it to regular users.
Yannik Horndt, modified 5 Years ago. New Member Posts: 9 Join Date: 1/31/19 Recent Posts
That's the conclusion I've come to as well.
Thank you for your answer.