| 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: 5.4.1
Syntax public void SetIndexWeight(
string indexName,
int weight
)
Public Sub SetIndexWeight (
indexName As String,
weight As Integer
)
Parameters
- indexName
- Type: SystemString
Name of the index. - weight
- Type: SystemInt32
The weight to assign to the index.
Exceptions 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