added facetingAfterDistinct to QueryParams

This commit is contained in:
Christopher Avery
2018-09-27 16:38:56 +01:00
parent 320b77dd19
commit 63865da511
2 changed files with 9 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ let _algoliaQueryParameters: QueryParameters = {
attributesToRetrieve: [''],
restrictSearchableAttributes: [''],
facets: '',
facetingAfterDistinct: true,
maxValuesPerFacet: 2,
attributesToHighlight: [''],
attributesToSnippet: [''],

View File

@@ -1129,6 +1129,14 @@ declare namespace algoliasearch {
* https://github.com/algolia/algoliasearch-client-js#facets
*/
facets?: string | string[];
/**
* Force faceting to be applied after de-duplication (via the Distinct setting).
* When using the distinct setting in combination with faceting, facet counts may be higher than expected.
* This is because the engine, by default, computes faceting before applying de-duplication (distinct).
* When facetingAfterDistinct is set to true, the engine calculates faceting after the de-duplication has been applied.
* default ""
*/
facetingAfterDistinct?: boolean;
/**
* Limit the number of facet values returned for each facet.
* default: ""