Method String
String(string, SearchPathDefinition<TDocument>, int?)
Creates a facet that narrows down Atlas Search results based on the most frequent string values in the specified string field.
public SearchFacet<TDocument> String(string name, SearchPathDefinition<TDocument> path, int? numBuckets = null)
Parameters
name
stringThe name of the facet.
path
SearchPathDefinition<TDocument>The field path to facet on.
numBuckets
int?The maximum number of facet categories to return in the results.
Returns
- SearchFacet<TDocument>
A string search facet.
String<TField>(string, Expression<Func<TDocument, TField>>, int?)
Creates a facet that narrows down Atlas Search result based on the most frequent string values in the specified string field.
public SearchFacet<TDocument> String<TField>(string name, Expression<Func<TDocument, TField>> path, int? numBuckets = null)
Parameters
name
stringThe name of the facet.
path
Expression<Func<TDocument, TField>>The field path to facet on.
numBuckets
int?The maximum number of facet categories to return in the results.
Returns
- SearchFacet<TDocument>
A string search facet.
Type Parameters
TField
The type of the field.