 | SphinxClientUpdateAttributesTUpdateable Method (String, SphinxAttributeUpdateTUpdateable) |
Updates attributes for the index with the given name with values from the given
sequence of SphinxAttributeUpdateItems.
Namespace:
SphinxConnector.NativeApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxpublic int UpdateAttributes<TUpdateable>(
string index,
params SphinxAttributeUpdate<TUpdateable>[] sphinxAttributeUpdates
)
where TUpdateable : IUpdateableType
Public Function UpdateAttributes(Of TUpdateable As IUpdateableType) (
index As String,
ParamArray sphinxAttributeUpdates As SphinxAttributeUpdate(Of TUpdateable)()
) As Integer
Parameters
- index
- Type: SystemString
The name of the index to update attributes for. - sphinxAttributeUpdates
- Type: SphinxConnector.NativeApiSphinxAttributeUpdateTUpdateable
The sphinx attribute update items.
Type Parameters
- TUpdateable
- The type of the attribute to update.
Return Value
Type:
Int32The number of updated documents. Maybe 0.
Exceptions
Remarks
The unlicensed version only updates one document per attribute.
ExamplesSphinxAttributeUpdate<SphinxInteger> realeaseYearAttributeUpdate = new SphinxAttributeUpdate<SphinxInteger>("release_year");
realeaseYearAttributeUpdate.AddUpdateValue(87, 1999);
int updateCount = sphinxClient.UpdateAttributes("sakila", realeaseYearAttributeUpdate);
Console.WriteLine("{0} documents(s) updated", updateCount);
See Also