Opensearch progress.

- Term search works
- Pending faceted search
- Ongoing: highlight of fuzzy results
This commit is contained in:
Porras-Bernardez 2024-06-07 17:44:13 +02:00
parent 6d1c1b28c3
commit 4f53411d07
5 changed files with 292 additions and 204 deletions

View file

@ -105,13 +105,29 @@ export interface Hit {
_id: string;
_score: number;
_source: Dataset;
_highlight: HitHighlight; // !! This name is to avoid collision with Typescript "Highlight" class
}
export interface HitHighlight {
subjects?: Array<string>;
title?: Array<string>;
author?: Array<string>;
}
export interface Aggregations {
[key: string]: Aggregation;
subjects: Subjects;
language: Language;
}
export interface Aggregation {
export interface Subjects {
doc_count_error_upper_bound: number;
sum_other_doc_count: number;
buckets: Array<Bucket>;
}
export interface Language {
doc_count_error_upper_bound: number;
sum_other_doc_count: number;
buckets: Array<Bucket>;
}
@ -119,3 +135,13 @@ export interface Bucket {
key: string;
doc_count: number;
}
// // Needed?
// export interface Aggregations {
// [key: string]: Aggregation;
// }
// export interface Aggregation {
// buckets: Array<Bucket>;
// }