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
namestringThe name of the facet.
pathSearchPathDefinition<TDocument>The field path to facet on.
numBucketsint?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
namestringThe name of the facet.
pathExpression<Func<TDocument, TField>>The field path to facet on.
numBucketsint?The maximum number of facet categories to return in the results.
Returns
- SearchFacet<TDocument>
A string search facet.
Type Parameters
TFieldThe type of the field.