PipelineStageDefinitionBuilderSearchTInput Method (SearchDefinitionTInput, SearchHighlightOptionsTInput, String, SearchCountOptions, Boolean, Boolean) |
Creates a $search stage.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public static PipelineStageDefinition<TInput, TInput> Search<TInput>(
SearchDefinition<TInput> searchDefinition,
SearchHighlightOptions<TInput> highlight = null,
string indexName = null,
SearchCountOptions count = null,
bool returnStoredSource = false,
bool scoreDetails = false
)
Public Shared Function Search(Of TInput) (
searchDefinition As SearchDefinition(Of TInput),
Optional highlight As SearchHighlightOptions(Of TInput) = Nothing,
Optional indexName As String = Nothing,
Optional count As SearchCountOptions = Nothing,
Optional returnStoredSource As Boolean = false,
Optional scoreDetails As Boolean = false
) As PipelineStageDefinition(Of TInput, TInput)
static member Search :
searchDefinition : SearchDefinition<'TInput> *
?highlight : SearchHighlightOptions<'TInput> *
?indexName : string *
?count : SearchCountOptions *
?returnStoredSource : bool *
?scoreDetails : bool
(* Defaults:
let _highlight = defaultArg highlight null
let _indexName = defaultArg indexName null
let _count = defaultArg count null
let _returnStoredSource = defaultArg returnStoredSource false
let _scoreDetails = defaultArg scoreDetails false
*)
-> PipelineStageDefinition<'TInput, 'TInput>
Parameters
- searchDefinition
- Type: MongoDB.Driver.SearchSearchDefinitionTInput
The search definition. - highlight (Optional)
- Type: MongoDB.Driver.SearchSearchHighlightOptionsTInput
The highlight options. - indexName (Optional)
- Type: SystemString
The index name. - count (Optional)
- Type: MongoDB.Driver.SearchSearchCountOptions
The count options. - returnStoredSource (Optional)
- Type: SystemBoolean
Flag that specifies whether to perform a full document lookup on the backend database
or return only stored source fields directly from Atlas Search.
- scoreDetails (Optional)
- Type: SystemBoolean
Flag that specifies whether to return a detailed breakdown
of the score for each document in the result.
Type Parameters
- TInput
- The type of the input documents.
Return Value
Type:
PipelineStageDefinitionTInput,
TInputThe stage.
See Also