Monday 4 June 2012

Search Configuration

Search Configuration

In order for your SharePoint site to be searchable, you must first create and configure a Search Service application. To do so, follow these steps:
  1. Open Central Administration, and click on the Manage Service Applications link, under Application Management:

  2. Click on the New icon in the ribbon (under the Create section), and select Search Service Application:
  3. The following dialog will appear, with entry fields to enter information needed to create the new Search Service Application. Enter a Service Application Name, and select ‘None’ under FAST Service Application. For the Search Service Account, you can create a managed account to associate with the Search Service Application (I kept the default Network Service account selection, for simplicity).
  4. You will then need to create a new application pool for the Search Admin Web Service. You can select an existing application pool by selecting one from the dropdown list, under the Use existing application pool selection. To create a new application pool, select the Create new application pool selection, and enter an appropriate name for your application pool. For the application pool security account, you can use a predefined account (I used the default Network Service account), or you can create a new managed account if you wish to have greater control over the service account.
  5. You will also need to create an application pool for the Search Query and Site Settings Web Service. You can select an existing application pool by selecting one from the dropdown list, under the Use existing application pool selection. To create a new application pool, select the Create new application pool selection, and enter an appropriate name for your application pool. For the application pool security account, you can use a predefined account (I used the default Network Service account), or you can create a new managed account if you wish to have greater control over the service account. Press the OK button when you are ready to create the new search service application.
  6. A dialog will appear when the system has successfully created the new search service application. Press OK to close this dialog.
  7. Returning to Central Administration, you should now see two (2) new service applications.
  8. The next step is to verify that the user(s) you selected as service accounts have the proper permissions for Search. Scroll down the list of service applications to find the User Profile Service Application and click on the whitespace next to it (so the ribbon changes). Click on the Administrators button in the ribbon, under the Operations section.
  9. A dialog will appear, with a listing of all the administrator accounts. Find the account(s) you specified for the service accounts (when configuring the search service application), and verify that the Retrieve People Data for Search Crawler checkbox is checked. In this example, the NT AUTHORITY\NETWORK SERVICE account was used as the service accounts, so that is the only account I need to verify. Press OK when you are finished.
  10. The next step is to verify that the service account(s) you selected as service accounts have read access to your SharePoint site. Go back to Central Administration, and under Application Management, click the Manage Web Applications link.
  11. Click on whitespace next to the SharePoint – 80 web application and select the User Policy button in the ribbon (under the Policy section).
  12. A dialog will appear. Verify your service account(s) have Full Read permissions. In this example, the NT AUTHORITY\NETWORK SERVICE account was used as the service accounts, so that is the only account I need to verify. Press OK when finished.

Crawling Configuration

Now that the service application is properly configured, the next step is to setup the search crawl, so content is included when a user performs a search.
  1. Open Central Administration and click your search service application (under Application Management à Manage Service Applications).
  2. You are now taken to the main area where you can specify all the configuration information for search in SharePoint 2010, including content sources, search crawls, search scopes, and crawl rules.
  3. In order to setup a search crawl for a SharePoint site, click on the Content Sources link, under the Crawling section (on the left hand side of the page). This page will display the content sources for the search (Local SharePoint Sites is created by default). Right mouse click on Local SharePoint Sites to display the context menu, and select Edit.
  4. The Edit Content Source page is displayed, and this is where you configure the content source. You are able to specify what URLs the content source will look through when crawling (under the Start Addresses section). You can also setup a crawl schedule for the content source, specify priority for the content source, as well as kick off a full crawl when you press the OK button.

Search Scopes

Search scopes define specific areas that users can search in, when performing searches from SharePoint. This gives you the flexibility to limit search results to specific content areas in your SharePoint environment.
Here are the following steps to configure a search scope. I am using a scope called Data Forms as an example, so you can repeat these steps for whatever search scope you wish to configure.
  1. Create a content source that corresponds to the search scope you are configuring.
  2. When you create the new content source, make sure you add the subsite location (or folder) in the Start Addresses that correspond to the area you want the search scope to crawl content for. Also select Custom – specify page depth and server hops options under Crawl Settings, with an unlimited page depth, so the crawler crawls all content under the start address you specify. Depending on how your content is structured, you may find it more appropriate to select one of the other crawl settings options. Press OK when finished.
  3. You need to create a crawl rule to include the address that corresponds to your search scope, so the crawler knows to include the content. Click on Manage Crawl Rule, under the Crawling section (on the left hand side links) to navigate to the page to create crawl rules.
  4. Click on New Crawl Rule, and enter the appropriate URL in the Path entry area. Select Include all items in this path, under the Crawl Configuration area. Selecting Exclude all items in this path will exclude the content in this rule. The three checkboxes are not necessary, unless you have specific data that has special crawling considerations. Press OK when finished.
  5. The next step is to create the actual search scope. Click on the Scopes link under Queries and Results section (in the left hand links area). This will display a page that lists all the search scopes in the system.
  6. Clicking on New Scope will display a page that allows you to create a new search scope. Give the new search scope a title. You can leave the Target Results Page selection to the default results page (unless you have a custom search results page created). Click OK when finished.
  7. You now need to add a couple of rules to the search scope, so right mouse click the newly-created search scope, and select Edit Properties and Rules.
  8. The Scope Properties and Rules page will display. This screen allows you to create rules that determine what content is included or excluded for this search scope.
  9. Click on New Rule to create another new rule for this search scope. For our rule, we are including all the content from the appropriate URL that corresponds to the subsite for the search scope. Select Web Address from the Scope Rule Type section, and select the Folder option from the Web Address section, and enter the appropriate URL. Under the Behavior section, select the Include option. Press OK when finished.
  10. As a last step, make sure you run full crawls on the entire site. This should update the crawled content, and you should be able to perform searches in your SharePoint environment.

No comments:

Post a Comment