mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
refactor: remodel buckets in SCFacet
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCThings, SCThingsField} from '../../../Classes';
|
||||
import {SCMap} from '../../../types/Map';
|
||||
|
||||
/**
|
||||
* A search response
|
||||
@@ -53,9 +52,9 @@ export interface SCSearchResult {
|
||||
*/
|
||||
export interface SCFacet {
|
||||
/**
|
||||
* Values for the aggregation
|
||||
* Buckets for the aggregation
|
||||
*/
|
||||
buckets: Array<SCMap<number>>;
|
||||
buckets: SCFacetBucket[];
|
||||
|
||||
/**
|
||||
* Field of the aggregation
|
||||
@@ -63,6 +62,21 @@ export interface SCFacet {
|
||||
field: SCThingsField;
|
||||
}
|
||||
|
||||
/**
|
||||
* A bucket of a facet
|
||||
*/
|
||||
export interface SCFacetBucket {
|
||||
/**
|
||||
* Count of matching search results
|
||||
*/
|
||||
count: number;
|
||||
|
||||
/**
|
||||
* Key of a bucket
|
||||
*/
|
||||
key: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores information about Pagination
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user