3

Searching is hard to completely understand using SharePoint 2013.

Is there a way to restrict search results to come from a certain view in document library?

It is possible to build a query?

I am thinking that I can restrict by Tag to make this happen, but I am not sure.

Is it possible to produce search results from a certain view?

2 Answers 2

1

Yes, you can.

Try adding a search results webpart to you page, and edit the properties.

Then click on "change query". You can specify a tag there.

enter image description here

If you use SharePoint 2013 Enterprise you can also you the CSWP.

Also you can do much more via the advanced view (Switch to Advanced Mode): enter image description here

4
  • Do I place name of the view in the Restrict on this tag field? Thanks, @Patrick Jun 3, 2016 at 14:44
  • 1
    You can return items only from a specific path and also filter for metadata
    – Patrick
    Jun 3, 2016 at 15:23
  • Okay. Is there a way to have the view link to not appear as one of the search results? I just want the documents to show in the results not the link to view. Thanks, @Patrick. Jun 3, 2016 at 20:55
  • Therefore you have to use your own display template. It is not that difficult. Try bing it
    – Patrick
    Jun 4, 2016 at 6:13
1

You cannot "Query a View". You can evaluate the view filter criteria and replicate the query in search. So if you want to filter on a Hashtag simply query the hashtag, like #SharePoint. If you are using other types of metadata you can query that too. The search engine is actually very controllable and predictable. If you are struggling I recommend the excellent book on the topic, Search Queries Explained. http://www.techmikael.com/2015/01/sharepoint-search-queries-explainedthe.html Mikael's blog is excellent as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.