Method Facet
Facet(SearchDefinition<TDocument>, IEnumerable<SearchFacet<TDocument>>)
Creates a search definition that groups results by values or ranges in the specified faceted fields and returns the count for each of those groups.
public SearchDefinition<TDocument> Facet(SearchDefinition<TDocument> @operator, IEnumerable<SearchFacet<TDocument>> facets)
Parameters
operatorSearchDefinition<TDocument>The operator to use to perform the facet over.
facetsIEnumerable<SearchFacet<TDocument>>Information for bucketing the data for each facet.
Returns
- SearchDefinition<TDocument>
A facet search definition.
Facet(SearchDefinition<TDocument>, params SearchFacet<TDocument>[])
Creates a search definition that groups results by values or ranges in the specified faceted fields and returns the count for each of those groups.
public SearchDefinition<TDocument> Facet(SearchDefinition<TDocument> @operator, params SearchFacet<TDocument>[] facets)
Parameters
operatorSearchDefinition<TDocument>The operator to use to perform the facet over.
facetsSearchFacet<TDocument>[]Information for bucketing the data for each facet.
Returns
- SearchDefinition<TDocument>
A facet search definition.
Facet(IEnumerable<SearchFacet<TDocument>>)
Creates a search definition that groups results by values or ranges in the specified faceted fields and returns the count for each of those groups. Facets are computed over all documents in the index.
public SearchDefinition<TDocument> Facet(IEnumerable<SearchFacet<TDocument>> facets)
Parameters
facetsIEnumerable<SearchFacet<TDocument>>Information for bucketing the data for each facet.
Returns
- SearchDefinition<TDocument>
A facet search definition.
Facet(params SearchFacet<TDocument>[])
Creates a search definition that groups results by values or ranges in the specified faceted fields and returns the count for each of those groups. Facets are computed over all documents in the index.
public SearchDefinition<TDocument> Facet(params SearchFacet<TDocument>[] facets)
Parameters
facetsSearchFacet<TDocument>[]Information for bucketing the data for each facet.
Returns
- SearchDefinition<TDocument>
A facet search definition.