IFulltext Query OptionsTDocumentField Weight(String, Int 32) Method
Sets a weight for the field with the given name.
Definition
Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
The current instance.
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
IFulltextQueryOptions<TDocument> FieldWeight(
string fieldName,
int weight
)VB
Function FieldWeight (
fieldName As String,
weight As Integer
) As IFulltextQueryOptions(Of TDocument)Parameters
- fieldName String
- The name of the field for which the weight should be set.
- weight Int32
- The weight to set for the field.
Return Value
IFulltextQueryOptionsTDocumentThe current instance.
Exceptions
| ArgumentException | Occurs when the field name is empty. |
| ArgumentNullException | Occurs when the field name is null. |