SearchDefinitionBuilderTDocumentRangeTField Method (ExpressionFuncTDocument, TField, SearchRangeTField, SearchScoreDefinitionTDocument) |
Creates a search definition that queries for documents where a field is in the specified range.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchDefinition<TDocument> Range<TField>(
Expression<Func<TDocument, TField>> path,
SearchRange<TField> range,
SearchScoreDefinition<TDocument> score = null
)
where TField : struct, new(), IComparable<TField>
Public Function Range(Of TField As {Structure, New, IComparable(Of TField)}) (
path As Expression(Of Func(Of TDocument, TField)),
range As SearchRange(Of TField),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member Range :
path : Expression<Func<'TDocument, 'TField>> *
range : SearchRange<'TField> *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument> when 'TField : struct, new() and IComparable<'TField>
Parameters
- path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
The indexed field or fields to search. - range
- Type: MongoDB.Driver.SearchSearchRangeTField
The field range. - score (Optional)
- Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.
Type Parameters
- TField
- The type of the field.
Return Value
Type:
SearchDefinitionTDocumentA a range search definition.
See Also