 | IFulltextQueryOptions<TDocument>.FieldWeight<TField> Method (Expression<Func<TDocument, TField>>, Int32) |
Sets a weight for the selected field.
Namespace: SphinxConnector.FluentApiAssembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
SyntaxIFulltextQueryOptions<TDocument> FieldWeight<TField>(
Expression<Func<TDocument, TField>> fieldSelector,
int weight
)
Function FieldWeight(Of TField) (
fieldSelector As Expression(Of Func(Of TDocument, TField)),
weight As Integer
) As IFulltextQueryOptions(Of TDocument)
Parameters
- fieldSelector
- Type: System.Linq.Expressions.Expression<Func<TDocument, TField>>
A function to select the field for which the weight should be set. - weight
- Type: System.Int32
The weight to set for the field.
Type Parameters
- TField
- The type of field to set a weight for.
Return Value
Type:
IFulltextQueryOptions<TDocument>The current instance.
See Also