Suppose we have some requirements that we want to see items that are not documents in our search results. In such situations we need to set up a Custom Search Center where they can search for either/all content, people, or just documents. Here we are going to create a new Search Center and a new tab for only documents. When users select this tab, only items that are documents appear in their search results.
Some of the new features of SharePoint 2010 Search are listed below
- Boolean query syntax has finally been introduced. These include AND, OR and NOT operators in your search queries.
- Suggestions whilst typing and after running search queries, a feature that we have come to love with major search engines such as Google and Bing.
- Integrating SharePoint Enterprise Search with Windows 7, allowing end users to utilize the Windows 7 search box to locate SharePoint 2010 content.
- Results display has been refined to provide filters for search results such as document type, categories and managed properties.
- View in Browsercapabilities, allows end users to view documents within their own browser utilizing Office Web Apps and not having to rely on launching the necessary Microsoft Office Application, or even the need for having it installed on their local machine. This is handy when browsing your SharePoint site via Kiosks and Internet Cafes that may not be running the Microsoft Office Suite.
- There have been a number of improvements to People Search, including phonetic name and nickname matching, and improved relevance and self-search.
Create an Enterprise Search Center and a Custom Search Box Page
- Navigate to your web application.
- Click Site Actions, and then click New Site.
- In the Create dialog box, click the Search category.
- Select the Enterprise Search Center template.
- Enter a Title and a URL Name of Documents and click Create.
- Click Site Actions, and then click More Options.
- In the Create dialog box, click the Page category.
- Select the Publishing Page template, and then click the Create button.
- Enter Documents in the Title text box.
- Enter Documents in the URL Name text box.
- Select (Welcome Page - Search box) in the Page Layout section list.
- Click the Create button.
- Click the Save & Close button on the Ribbon.
Create a Custom Search Results Page
- Click Site Actions, and then click More Options.
- In the Create dialog box, click the Page category.
- Select the Publishing Page template, and then click the Create button.
- Enter a DocumentResults in the Title text box.
- Enter DocumentResults in the URL Name text box.
- Select (Welcome Page - Search results) in the Page Layout section list.
- Click the Create button.
- Click the Save & Close button on the Ribbon.
Modify the Search Core Results Web Part to Return Only Documents
- Verify that you are on the DocumentResults Search Results page you just created earlier.
- Click Site Actions, and then click Edit Page.
- Locate the Bottom Zone in the Web Part page.
- Locate the Search Core Results Web Part.
- Hover your mouse over the upper right corner of the Web Part until a down arrow displays. Click the down arrow to display the Web Part menu.
- Click Edit Web Part.
- Locate the Search Core Results tool pane in the upper right corner of the Web Part page. Expand the Result Query Options section.
- Enter IsDocument:1 into the Append Text To Query text box.
- Click the OK button of the Search Core Results tool pane.
- Click the Save and Close button to save and close the DocumentResults.aspx page.
Add a Custom Tab to the Search Center and Modify the Search Box Web Part
- Navigate to the site we created in earlier.
- Click Site Actions, and then click Edit Page.
- Locate the Add New Tab link and click it.
- In the Tabs In Search Pages item dialog, enter a Tab Name of Just Documents.
- Enter documents.aspx in the Page text box.
- Click the Save button.
- Click the Browser Refresh button so the Just Documents tab displays.
- Click Site Actions, and then click Edit Page.
- Locate the Search Box Web Part.
- Click the upper right corner down arrow to display the Web Part menu.
- Click Edit Web Part.
- Locate the Search Box tool pane in the upper right corner of the Web Part page. Expand the Miscellaneous section.
- In the Target search results page URL, enter documentresults.aspx.
- Click the OK button of the Search Box tool pane.
- Click the Save and Close button to save and close the default.aspx page.