Click or drag to resize

SearchFacetBuilder<TDocument>.String Method (String, SearchPathDefinition<TDocument>, Nullable<Int32>)

Creates a facet that narrows down Atlas Search results 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.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public SearchFacet<TDocument> String(
	string name,
	SearchPathDefinition<TDocument> path,
	int? numBuckets = null
)

Parameters

name
Type: System.String
The name of the facet.
path
Type: MongoDB.Driver.Search.SearchPathDefinition<TDocument>
The field path to facet on.
numBuckets (Optional)
Type: System.Nullable<Int32>
The maximum number of facet categories to return in the results.

Return Value

Type: SearchFacet<TDocument>
A string search facet.
See Also