I need to setup a Result source in SharePoint Online to return library names only.
I have a query transform like this:{searchTerms} (contentclass:STS_List_DocumentLibrary)
but it does not work
Can some one give me a tip on how to get that work
I need to setup a Result source in SharePoint Online to return library names only.
I have a query transform like this:{searchTerms} (contentclass:STS_List_DocumentLibrary)
but it does not work
Can some one give me a tip on how to get that work
Whether you use the query in the classic search or modern search?
If you use classic search, per my test, the query works in the classic search.
Please remember to set the new result source as default after creating it.
If you use modern search, you could add a PnP search results web part in the modern pages to do search.
1.Edit -> Add a new web part -> PnP-search results.
2.Configure -> SharePoint search -> Add (contentclass:STS_List_DocumentLibrary) in the Query template section-> Apply.
3.In the Selected properties section, select ‘Path’ and ‘Title’.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
I am on a Team Site without O365 group, not on a modern site. The Site Collection settings > Result Source setting pages looked same as in SP2013.
But it returned "Something went wrong" when I tested that query
Could you please show me Screenshots of the error and the page of your query? Thank you.
unable to upload image. it keeps saying "10 characters needed" or "5 characters needed" what does that mean?
[1]: /answers/storage/attachments/94837-capturemsqna.png
I have attached the screenshot below. Any idea why it is not working for me?
[1]: /answers/storage/attachments/95333-capturemsqna.png
Could you please tap "show details" to show more details, that will help us to know what is going wrong. And thank you for you help.
5 people are following this question.