Share via


Osearch: Stsadm operation (Office SharePoint Server)

Applies To: Office SharePoint Server 2007

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2015-03-09

Operation name: Osearch

Description

Manages the Office SharePoint Server Search service.

Important

If you detach and reattach a content database, be aware that the next time the content within that content database is crawled a full crawl will occur even if an incremental crawl has been requested. Because a full crawl re-crawls all content that the crawler encounters, regardless of whether that content has been previously crawled, full crawls can take significantly more time to complete than incremental crawls.

Syntax

stsadm -o osearch

**\[-action\]**

**\[-f\] \<suppress prompts\>**

**\[-role\] \<index, query, or both\>**

**\[-farmcontactemail\] \<e-mail address\>**

**\[-farmperformancelevel\] \<indexing performance\>**

**\[-farmserviceaccount\] \<account name\>**

**\[-farmservicepassword\] \<password\>**

**\[-defaultindexlocation\] \<directory\>**

**\[-propagationlocation\] \<directory\>**

**\[-reprovisionindex\]**

**\[-cleansearchdatabase\] {true | false}**

**\[-ssp\] \<ssp name\>**

Parameters

Parameter

Value

Required?

Description

action

Any one of the following values:

  • List

  • Start

  • Stop

Yes

Specifies the action to perform. The required parameters for "start" (if not already set) are role, farmcontactemail, and farmserviceaccout, and farmservicepassword.

f

<none>

No

Suppresses prompts. Used with the action parameter.

role

Any one of the following values:

  • Index

  • Query

  • IndexQuery

Specifies whether a particular server is an index server, a query server, or both.

farmcontactemail

A valid e-mail address in the form: someone@example.com

No. However, this parameter is required when you use it with the start value.

Specifies an e-mail address that external site administrators can contact if problems occur when their site is being crawled. This setting applies to all servers in the farm.

farmperformancelevel

Any one of the following values:

  • Reduced

  • PartlyReduced

  • Maximum

No

Adjusts the indexing performance level for each index server. The default setting is Reduced. You can only configure this setting for a specific index server, not for the Shared Services Provider (SSP).

farmserviceaccount

<none>

No

The user name for the account under which the Office SharePoint Server Search service account will run. Configuring or modifying this account affects all index and query servers in the server farm.

Note

The farm search service account must not be a service account for security reasons and for it to access the database and content index. Examples of built-in accounts are Local Service and Network Service.

farmservicepassword

<none>

No

The password for the farmserviceaccount parameter.

defaultindexlocation

A valid folder location in the form: C:\Folder\Subfolder

By default, the search index will be located at this path on this server. For index servers, you can specify a different path when you create an SSP. To change the index file location for an existing SSP, use the indexlocation parameter of the Editssp operation.

Note

Changing the index location will reset the index. To move an index with a reset, use the noreset parameter of the Spsearchsensitive or Osearchsensitive operation.

propagationlocation

A valid location, such as “C:\Searchindexes”

This is the location where search indexes propagated to a server are stored. This path must be shared to allow propagation to the server to occur. A search service account will be given write access to the propagation shared folder and the shared folder will be named “Searchindexpropagation.”

Note

This setting is available when the Use this server for serving search queries check box is the only check box selected.

reprovisionindex

A valid SSP name, such as "Shared_Service1"

No. However, the ssp parameter must be used.

Re-initializes a query server for a single SSP.

Note

This parameter was introduced in Microsoft Office SharePoint Server 2007 with Service Pack 1 (SP1).

cleansearchdatabase

Either one of the following:

  • true

  • false

No. However, the ssp parameter must be used.

When the cleansearchdatabase parameter is set to true, it enables cleanup of the database table that stores document properties. The cleanup occurs during service startup. For additional information, see the Remarks section.

Note

This parameter does not require a full crawl of an index to occur.

Note

This parameter was introduced in Microsoft Office SharePoint Server 2007 with Service Pack 1 (SP1).

ssp

A valid SSP name, such as "Shared_Service1"

No. However, it is a required parameter if either the reprovisionindex or cleansearchdatabase parameter is used.

Specifies the catalog of the SSP name to reinitialize.

Note

This parameter was introduced in Microsoft Office SharePoint Server 2007 with Service Pack 1 (SP1).

Examples

To start the Office SharePoint Server Search service (Osearch), use the following syntax:

stsadm -o osearch -action start

To stop the Office SharePoint Server Search service (Osearch), use the following syntax:

stsadm -o osearch -action stop[-f]

Important

When this parameter is used, the following warning message is displayed: "Warning: The Office SharePoint Server Search service that was enabled on this server will be uninstalled and all index files will be deleted. Are you sure you want to permanently delete all data in the index? [y/n]" To suppress this warning message, use the -f parameter.

Remarks

If you are running the Infrastructure Update for Microsoft Office Servers, the identifier (ID) of each content database is retained when you restore or reattach the database by using built-in tools. Default change log retention behavior when using built-in tools is as follows:

  • The change logs for all databases are retained when you restore a farm.

  • The change log for a content database is retained when you reattach the database.

  • The change log for a content database is NOT retained when you restore just the content database.

When a database ID and change log are retained, Search continues crawling based on the regular schedule defined by crawl rules. When a change log is not retained, Search performs a full crawl during the next scheduled crawl. For more information, see Move content databases (Office SharePoint Server 2007) and Back up and restore an entire farm (Office SharePoint Server 2007).

Occasionally, a database table entry for a deleted document may still exist in the index. Using the cleansearchdatabase parameter removes any orphaned properties that might be present in the table, which ensures that they will not show up in future search results.