1

So I have this scenario:

  1. I have a list with a column called Status
  2. The status field is either Open or Closed

What I want to do is to only include in search results items whose status are Open. Is there a way to do that?

2
  • Where you want to include? in your view? Commented May 5, 2016 at 10:19
  • @AakashMorya I should have been more specific. I need to exclude them from search results.
    – Nathan
    Commented May 5, 2016 at 10:21

2 Answers 2

2

You can use Search query Webpart for this and use filters to refine your result set. Have a look at the following link on how to configure this
Using-content-search-web-part-and understanding SP2013 search

1

If you're on SP 2013 - Create a result source. The query in the result source should look something like

{searchTerms} Status:"Open" ContentTypdId:0x01xxxxxxx

ContentTypeId should be the content type for your list

Configure your content search webpart or search results web part to use your new result source

1
  • I would use the path to the list instead of the content type id (as it is sometimes tricky to get this to work correctly (if the list content type is inheriting from another content type and the same column is used in another list with the same content type. So I do suggest you change the query a little bit to: {searchTerms} Status:"Open" Path:site.sharepoint.com/sitename/Lists/listname Commented May 5, 2016 at 15:01

Your Answer

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

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