OpenSearch - some progress in migration

This commit is contained in:
Porras-Bernardez 2024-06-06 17:11:54 +02:00
parent a853e93b68
commit 6d1c1b28c3
5 changed files with 143 additions and 137 deletions

View file

@ -7,14 +7,6 @@ export interface SolrResponse {
// facet_counts: FacetCount;
}
// OPENSEARCH
export interface OpenResponse {
responseHeader: ResponseHeader;
response: ResponseContent;
facets: FacetFields;
// facet_counts: FacetCount;
}
export interface ResponseHeader {
status: boolean;
QTime: number;
@ -79,3 +71,51 @@ export class FacetItem {
}
}
//#endregion
// OPENSEARCH
// ========================================================================
export interface OpenSearchResponse {
took: number;
timed_out: boolean;
_shards: Shards;
hits: Hits;
aggregations?: Aggregations;
}
export interface Shards {
total: number;
successful: number;
skipped: number;
failed: number;
}
export interface Hits {
total: Total;
max_score: number;
hits: Array<Hit>;
}
export interface Total {
value: number;
relation: string;
}
export interface Hit {
_index: string;
_id: string;
_score: number;
_source: Dataset;
}
export interface Aggregations {
[key: string]: Aggregation;
}
export interface Aggregation {
buckets: Array<Bucket>;
}
export interface Bucket {
key: string;
doc_count: number;
}