Click or drag to resize
SphinxSearchOptionsSetIndexWeight Method
Sets a weight for the index with the given name. The method should be called for each index that should have a weight set. If a weight for an index has previously been set, it will be overwritten.

Namespace: SphinxConnector.NativeApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax
public void SetIndexWeight(
	string indexName,
	int weight
)

Parameters

indexName
Type: SystemString
Name of the index.
weight
Type: SystemInt32
The weight to assign to the index.
Exceptions
ExceptionCondition
ArgumentExceptionindexName is empty.
ArgumentNullExceptionindexName is null.
Examples
//Assign a weight of 100 to index_1 and a weight of 200 to index_2 SphinxClient sphinxClient = new SphinxClient(); sphinxClient.SearchOptions.SetIndexWeight("index_1", 100); sphinxClient.SearchOptions.SetIndexWeight("index_2", 200);
See Also