353 lines
5.3 KiB
TypeScript
353 lines
5.3 KiB
TypeScript
export interface HadithResponseModel {
|
|
status: number;
|
|
message: string;
|
|
postion: number;
|
|
meta: any;
|
|
took: number;
|
|
timed_out: boolean;
|
|
_shards: Shards;
|
|
hits: Hits;
|
|
aggregations: Aggregations;
|
|
params: Params;
|
|
}
|
|
export interface HadithResponseShowModel {
|
|
status: number
|
|
message: string
|
|
postion: number
|
|
meta: any
|
|
_index: string
|
|
_id: string
|
|
_version: number
|
|
_seq_no: number
|
|
_primary_term: number
|
|
found: boolean
|
|
_source: Source
|
|
}
|
|
|
|
export interface Shards {
|
|
total: number;
|
|
successful: number;
|
|
skipped: number;
|
|
failed: number;
|
|
}
|
|
|
|
export interface Hits {
|
|
total: Total;
|
|
max_score: number;
|
|
hits: Hit[];
|
|
}
|
|
|
|
export interface Total {
|
|
value: number;
|
|
relation: string;
|
|
}
|
|
|
|
export interface Hit {
|
|
_index: string;
|
|
_id: string;
|
|
_score: number;
|
|
_source: Source;
|
|
highlight?: Highlight;
|
|
}
|
|
|
|
export interface Source {
|
|
id: string;
|
|
address: Address;
|
|
content: string;
|
|
meta: Meta;
|
|
parag_order: number;
|
|
style_tag: string;
|
|
heading_level: number;
|
|
sub_ayehs: any[];
|
|
sub_hadithes: any[];
|
|
type_key: string;
|
|
type_title: string;
|
|
lang: string;
|
|
tocs: string[];
|
|
xml: string;
|
|
ai_embeddings: number[];
|
|
ai_classes: AiClass[];
|
|
}
|
|
|
|
export interface Address {
|
|
book_title: string;
|
|
page_end: number;
|
|
page_num: number;
|
|
vol_id: string;
|
|
vol_num: string;
|
|
vol_title: string;
|
|
}
|
|
|
|
export interface Meta {
|
|
hadith_description: string;
|
|
hadith_sanad: string;
|
|
hadith_references: any[];
|
|
}
|
|
|
|
export interface AiClass {
|
|
score: number;
|
|
label: string;
|
|
}
|
|
|
|
export interface Highlight {
|
|
"content.fa": string[];
|
|
xml: string[];
|
|
"ai_classes.label"?: string[];
|
|
"content.ph": string[];
|
|
content: string[];
|
|
type_key: string[];
|
|
}
|
|
|
|
export interface Aggregations {
|
|
book_title: BookTitle;
|
|
ai_classes: AiClasses;
|
|
ai_keywords: AiKeywords;
|
|
vol_title: VolTitle;
|
|
type_title: TypeTitle;
|
|
lang: Lang;
|
|
}
|
|
|
|
export interface BookTitle {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket[];
|
|
}
|
|
|
|
export interface Bucket {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface AiClasses {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket2[];
|
|
}
|
|
|
|
export interface Bucket2 {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface AiKeywords {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket3[];
|
|
}
|
|
|
|
export interface Bucket3 {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface VolTitle {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket4[];
|
|
}
|
|
|
|
export interface Bucket4 {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface TypeTitle {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket5[];
|
|
}
|
|
|
|
export interface Bucket5 {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface Lang {
|
|
doc_count_error_upper_bound: number;
|
|
sum_other_doc_count: number;
|
|
buckets: Bucket6[];
|
|
}
|
|
|
|
export interface Bucket6 {
|
|
key: string;
|
|
doc_count: number;
|
|
}
|
|
|
|
export interface Params {
|
|
index: string;
|
|
body: Body;
|
|
}
|
|
|
|
export interface Body {
|
|
query: Query;
|
|
from: string;
|
|
size: string;
|
|
aggs: Aggs;
|
|
highlight: Highlight2;
|
|
}
|
|
|
|
export interface Query {
|
|
bool: Bool;
|
|
}
|
|
|
|
export interface Bool {
|
|
must: Must[];
|
|
}
|
|
|
|
export interface Must {
|
|
bool: Bool2;
|
|
}
|
|
|
|
export interface Bool2 {
|
|
should?: Should[];
|
|
filter?: Filter;
|
|
}
|
|
|
|
export interface Should {
|
|
match_phrase?: MatchPhrase;
|
|
match?: Match;
|
|
bool?: Bool3;
|
|
}
|
|
|
|
export interface MatchPhrase {
|
|
"content.ph": ContentPh;
|
|
}
|
|
|
|
export interface ContentPh {
|
|
query: string;
|
|
boost: number;
|
|
}
|
|
|
|
export interface Match {
|
|
"content.fa"?: ContentFa;
|
|
content?: Content;
|
|
"content.ar"?: ContentAr;
|
|
}
|
|
|
|
export interface ContentFa {
|
|
query: string;
|
|
boost: number;
|
|
}
|
|
|
|
export interface Content {
|
|
query: string;
|
|
boost: number;
|
|
}
|
|
|
|
export interface ContentAr {
|
|
query: string;
|
|
boost: number;
|
|
}
|
|
|
|
export interface Bool3 {
|
|
must: Must2[];
|
|
}
|
|
|
|
export interface Must2 {
|
|
match: Match2;
|
|
}
|
|
|
|
export interface Match2 {
|
|
book_title: BookTitle2;
|
|
}
|
|
|
|
export interface BookTitle2 {
|
|
query: string;
|
|
boost: number;
|
|
}
|
|
|
|
export interface Filter {
|
|
bool: Bool4;
|
|
}
|
|
|
|
export interface Bool4 {
|
|
must: Must3[];
|
|
}
|
|
|
|
export interface Must3 {
|
|
term: Term;
|
|
}
|
|
|
|
export interface Term {
|
|
type_key: string;
|
|
}
|
|
|
|
export interface Aggs {
|
|
book_title: BookTitle3;
|
|
ai_classes: AiClasses2;
|
|
ai_keywords: AiKeywords2;
|
|
vol_title: VolTitle2;
|
|
type_title: TypeTitle2;
|
|
lang: Lang2;
|
|
}
|
|
|
|
export interface BookTitle3 {
|
|
terms: Terms;
|
|
}
|
|
|
|
export interface Terms {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface AiClasses2 {
|
|
terms: Terms2;
|
|
}
|
|
|
|
export interface Terms2 {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface AiKeywords2 {
|
|
terms: Terms3;
|
|
}
|
|
|
|
export interface Terms3 {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface VolTitle2 {
|
|
terms: Terms4;
|
|
}
|
|
|
|
export interface Terms4 {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface TypeTitle2 {
|
|
terms: Terms5;
|
|
}
|
|
|
|
export interface Terms5 {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface Lang2 {
|
|
terms: Terms6;
|
|
}
|
|
|
|
export interface Terms6 {
|
|
field: string;
|
|
size: number;
|
|
}
|
|
|
|
export interface Highlight2 {
|
|
pre_tags: string[];
|
|
post_tags: string[];
|
|
fields: Fields;
|
|
require_field_match: boolean;
|
|
fragment_size: number;
|
|
number_of_fragments: number;
|
|
boundary_scanner: string;
|
|
}
|
|
|
|
export interface Fields {
|
|
"*": GeneratedType;
|
|
}
|
|
|
|
export interface GeneratedType {}
|