SearchFacetBuilderTDocumentStringTField Method (String, ExpressionFuncTDocument, TField, NullableInt32) |
Creates a facet that narrows down Atlas Search result based on the most frequent
string values in the specified string field.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax public SearchFacet<TDocument> String<TField>(
string name,
Expression<Func<TDocument, TField>> path,
Nullable<int> numBuckets = null
)
Public Function String(Of TField) (
name As String,
path As Expression(Of Func(Of TDocument, TField)),
Optional numBuckets As Nullable(Of Integer) = Nothing
) As SearchFacet(Of TDocument)
member String :
name : string *
path : Expression<Func<'TDocument, 'TField>> *
?numBuckets : Nullable<int>
(* Defaults:
let _numBuckets = defaultArg numBuckets null
*)
-> SearchFacet<'TDocument>
Parameters
- name
- Type: SystemString
The name of the facet. - path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
The field path to facet on. - numBuckets (Optional)
- Type: SystemNullableInt32
The maximum number of facet categories to return in the results.
Type Parameters
- TField
- The type of the field.
Return Value
Type:
SearchFacetTDocumentA string search facet.
See Also