SearchDefinitionBuilderTDocumentRangeTField Method (SearchPathDefinitionTDocument, 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>(
SearchPathDefinition<TDocument> 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 SearchPathDefinition(Of TDocument),
range As SearchRange(Of TField),
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member Range :
path : SearchPathDefinition<'TDocument> *
range : SearchRange<'TField> *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument> when 'TField : struct, new() and IComparable<'TField>
Parameters
- path
- Type: MongoDB.Driver.SearchSearchPathDefinitionTDocument
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