How to Create a Search that is specific to list fields and documents only?

Is there a way to have the search web part be specific to my list (in this case it's contacts with some custom fields)  and document libraries only?

1.  I have multiple document libraries and a contact list that I want the search to look in.  Can that be done?

2.  I want to refine the search to only look at some fields in the list,  (eg.  firstname, lastname, department, etc).  Currently  if someone looks for a name, it returns contacts that have been modified by a particular user.  For instance, if john smith is the modified of contacts and you search for John smith, you get all the contacts.

June 26th, 2015 4:37pm

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

Free Windows Admin Tool Kit Click here and download it now
June 27th, 2015 2:18am

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

June 27th, 2015 6:13am

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

Free Windows Admin Tool Kit Click here and download it now
June 27th, 2015 6:13am

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

June 27th, 2015 6:13am

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

Free Windows Admin Tool Kit Click here and download it now
June 27th, 2015 6:13am

Hi,

Yes, you can have custom page and add the search results web part in it.  Edit the search results web part and change the query to the sample query like this.

contentclass:sts_listitem_contacts

http://blogs.msdn.com/b/mvpawardprogram/archive/2015/02/16/sharepoint-power-searching-using-contentclass.aspx

Now you will have the results only from contacts lists.  If you want to have results specific to some fields, then you need to create the managed property with the required field mapping.  Run the full crawl and then using created managed property you can filter the data on specific field. For example in the search box you can search as shown below, firstname contains john keyword.

FirstName:John
 

https://technet.microsoft.com/en-us/library/jj219630.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx


And also display templates can be used to customize your search results.

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/
Please don't forget to mark it as answered, if your problem resolved or helpful.

June 27th, 2015 6:13am

1. You can use something like this for the base query:

toy AND (contentclass=STS_ListItem_DocumentLibrary OR path:https://yourServer/sites/yourSite/Lists/Contacts)

or as used in the Query Builder in a Search Results web part:

{searchboxquery}  AND (contentclass=STS_ListItem_DocumentLibrary OR path:https://yourServer/sites/yourSite/Lists/Contacts)

2. Not cleanly. All of the columns would need to be Site Columns and in most cases you would need to configure the Managed Properties with useful names. Try something like:

title:"Mike" OR coursetitle:"Mike" OR lastname:"Mike"

or as used in the Query Builder in a Search Results web part:

title:{searchboxquery} OR coursetitle:{searchboxquery} OR lastname:{searchboxquery}

Free Windows Admin Tool Kit Click here and download it now
June 27th, 2015 6:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics