Click or drag to resize

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.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public SearchDefinition<TDocument> Range<TField>(
	SearchPathDefinition<TDocument> path,
	SearchRange<TField> range,
	SearchScoreDefinition<TDocument> score = null
)
where TField : struct, new(), 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: SearchDefinitionTDocument
A a range search definition.
See Also