Office 365 People Search:Hide default result



Out of the box, People search result webpart shows the list of people as a result.

However, I had a requirement to remove the default people search coming in result webpart when page loads.

with the default query :
- {searchboxquery}contentclass=spspeople -accountname:rapidcircle.in


Spent few hours to find the solution finally got this useful tip from my Search guru MIKAEL SVENSON

To remove the default result need to bind the query with {?<query>}

the {?{searchboxquery}} will remove everything in the query if the {searchboxquery} variable is empty

Hope this small piece of information will save your time.





Comments

Popular posts from this blog

Search Query by ContentType name issue

SharePoint 2013 List CRUD operation using Angular and REST API

Search Result Webpart,Filter result If QueryString is present in URL