Addition of "doctype"/datatype as another possible facet and search element to use

This commit is contained in:
Porras-Bernardez 2024-08-19 15:45:52 +02:00
parent 110c2db8bf
commit 03a55f6a58
7 changed files with 42 additions and 10 deletions

View file

@ -82,7 +82,8 @@ export class Suggestion {
export enum SearchType {
Title = "title",
Author = "author",
Subject = "subjects" // ** !! The field has this name in OpenSearch!!
Subject = "subjects", // ** !! The field has this name in OpenSearch!!
Doctype = "doctype"
}
export class DbDataset {

View file

@ -96,11 +96,13 @@ export interface HitHighlight {
subjects?: Array<string>;
title?: Array<string>;
author?: Array<string>;
doctype?: Array<string>;
}
export interface Aggregations { // Equivalent SOLR: FacetFields
subjects: Subjects;
language: Language;
language: Language;
doctype: Doctype;
}
export interface Subjects {
@ -115,6 +117,12 @@ export interface Language {
buckets: Array<Bucket>;
}
export interface Doctype {
doc_count_error_upper_bound: number;
sum_other_doc_count: number;
buckets: Array<Bucket>;
}
export interface Bucket {
key: string;
doc_count: number;