Step by Step: Adding Search Box to a SharePoint page

I found very few articles on how to use the out of the box search web parts for SharePoint.  There is an MSDN article here to provide some background but here is a few steps to get your started.  This one basically provide a direct search to a specific list not on the page using the Search Box web part. Here goes:
  1. Go to your page > Site Actions > Edit Page 
  2. Click Add a Web Part, select the “Search Box” and click Add 
  3. Locate the web part you added and select Edit > Modify Shared Web Part
  4. Navigate to the far right to start configuring the web part; I’ve highlighted a few options below.
Scopes Dropdown:
·   Dropdown Mode: Select the one that works for you. 
·   Dropdown label: This adds test to the left of the scope and can be used to clarify search parameters.
Query Text Box:
·   Query text box label: This place a label to the left of the query text box.
·   Query text box width (in pixels): I like to change the Query Text box width to 400-500 pixels depending on the page as it give users more room type their search.
·   Additional query terms:  This is where you really get to tweak or focus the search. You can add in options such as these; This will only pull back results with this filter. Make sure to check off “Append additional terms to query”
o   contenttype:"Project Documents"
o   scope:”This List: Project Directory”
o   site:”http://yoursite.com”
·   Additional query description label: This places a label below the query text box.
·   Query box prompt string: This temporarily places text in the query text box to prompt the users to type in their query such as “Type your search here”
 Miscellaneous, Appearance, Layout, and Advanced: Set these like you would any other webpart.

Here is an example of the webpart with all options filled in:
If you have trouble setting your Additional query terms, test the query directly in your searchcenter to tune your query before entering it in your search box web part.
Good luck

0 comments:

Post a Comment