One of my clients have come up with a requirement to hide DispForm.aspx
from the search results. I have researched on this a lot and come across an approach where we need to create a Query Rule
and create a search query such that it would hide DispForm.aspx
from the results. But it does not work for me.
I have tried with both these queries but none of them work for me.
{?{searchTerms} (-Title:DispForm.aspx)}
{?{searchTerms} (-Path:DispForm.aspx)}
Please guide.
{?{searchTerms} STS_ListItem}