-
Notifications
You must be signed in to change notification settings - Fork 107
SPSearchIndexPartition
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Index | Key | UInt32 | The number of the partition in this farm | |
Servers | Required | StringArray[] | A list of the servers that this partition should exist on | |
RootDirectory | Write | String | The directory that the index should use locally on each server to store data | |
ServiceAppName | Key | String | The name of the search service application |
Type: Distributed Requires CredSSP: No
This resource is responsible for creating search indexes. It works by creating the index topology components and updating the topology from the server that runs this resource. For this reason this resource only needs to run from one server and not from each server which will host the index component. The search service application and existing search topology must be deployed before creating additional indexes. The first index will be created through the use of the SPSearchRoles resource. Additional search index partitions can be created through using this resource.
NOTE 1: To make sure that the search topology is applied correctly, the path specified for RootDirectory needs to exist on the server that is executing this resource. For example, if the below example was executed on "Server1" it would also need to ensure that it was able to create the index path at I:. If no disk labeled I: was available on server1, this would fail, even though it will not hold an actual index component.
NOTE 2: Make sure that each created index partition uses its own RootDirectory folder, else you will get an error stating that the specified directory is not empty.
This example adds an extra search partition to the local farms topology
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPSearchIndexPartition AdditionalPartition
{
Servers = @("Server2", "Server3")
Index = 1
RootDirectory = "I:\SearchIndexes\1"
ServiceAppName = "Search Service Application"
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations