SearchDefinitionBuilderTDocumentQueryStringTField Method (ExpressionFuncTDocument, TField, 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.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax public SearchDefinition<TDocument> QueryString<TField>(
Expression<Func<TDocument, TField>> defaultPath,
string query,
SearchScoreDefinition<TDocument> score = null
)
Public Function QueryString(Of TField) (
defaultPath As Expression(Of Func(Of TDocument, TField)),
query As String,
Optional score As SearchScoreDefinition(Of TDocument) = Nothing
) As SearchDefinition(Of TDocument)
member QueryString :
defaultPath : Expression<Func<'TDocument, 'TField>> *
query : string *
?score : SearchScoreDefinition<'TDocument>
(* Defaults:
let _score = defaultArg score null
*)
-> SearchDefinition<'TDocument>
Parameters
- defaultPath
- Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
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.
Type Parameters
- TField
- The type of the field.
Return Value
Type:
SearchDefinitionTDocumentA query string search definition.
See Also