SearchDefinitionBuilderTDocumentQueryString Method (FieldDefinitionTDocument, String, SearchScoreDefinitionTDocument) |
Creates a search definition that queries a combination of indexed fields and values.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchDefinition<TDocument> QueryString(
FieldDefinition<TDocument> defaultPath,
string query,
SearchScoreDefinition<TDocument> score = null
)
Public Function QueryString (
defaultPath As FieldDefinition(Of TDocument),
query As String,
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member QueryString :
defaultPath : FieldDefinition<'TDocument> *
query : string *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument>
Parameters
- defaultPath
- Type: MongoDB.DriverFieldDefinitionTDocument
The indexed field to search by default. - query
- Type: SystemString
One or more indexed fields and values to search. - score (Optional)
- Type: MongoDB.Driver.SearchSearchScoreDefinitionTDocument
The score modifier.
Return Value
Type:
SearchDefinitionTDocumentA query string search definition.
See Also