forked from geolba/tethys.frontend
Facetsearch progressed. Pending fixing onClearFacetCategoryOPEN behaviour. Facets menu doesn't work properly.
This commit is contained in:
parent
a70e454cbc
commit
da430d6142
6 changed files with 264 additions and 92 deletions
|
@ -80,9 +80,9 @@ export class Suggestion {
|
|||
// }
|
||||
|
||||
export enum SearchType {
|
||||
Title = "Title",
|
||||
Author = "Author",
|
||||
Subject = "Subject"
|
||||
Title = "title",
|
||||
Author = "author",
|
||||
Subject = "subject"
|
||||
}
|
||||
|
||||
export class DbDataset {
|
||||
|
|
|
@ -18,19 +18,6 @@ export interface ResponseHeaderParams {
|
|||
rows?: number;
|
||||
start?: number;
|
||||
wt?: string;
|
||||
|
||||
// 0:'fl=id,licence,server_date_published,abstract_output,identifier,title_output,title_additional,author,subject,doctype'
|
||||
|
||||
// df:'title'
|
||||
// facet:'on'
|
||||
// indent:'on'
|
||||
// json.facet.language:'{ type: "terms", field: "language" }'
|
||||
// json.facet.subject:'{ type: "terms", field: "subject" }'
|
||||
// q:'title:Geodaten - Blatt 49 Wels (1:50.000)'
|
||||
// q.op:'and'
|
||||
// rows:'10'
|
||||
// start:'0'
|
||||
// wt:'json'
|
||||
}
|
||||
|
||||
export interface ResponseContent {
|
||||
|
@ -40,21 +27,16 @@ export interface ResponseContent {
|
|||
}
|
||||
|
||||
export class FacetResults {
|
||||
// language!: Array<FacetItem>;
|
||||
// subject!: Array<FacetItem>;
|
||||
[key: string]: Array<FacetItem>;
|
||||
}
|
||||
|
||||
export class FacetFields {
|
||||
// count: number;
|
||||
language!: FacetInstance;
|
||||
subject!: FacetInstance;
|
||||
// [key: string]: FacetInstance;
|
||||
}
|
||||
|
||||
export interface FacetInstance {
|
||||
[key: string]: Array<FacetItem>;
|
||||
// buckets: Array<FacetItem>;
|
||||
}
|
||||
|
||||
export class FacetItem {
|
||||
|
@ -78,8 +60,8 @@ export interface OpenSearchResponse {
|
|||
took: number;
|
||||
timed_out: boolean;
|
||||
_shards: Shards;
|
||||
hits: Hits;
|
||||
aggregations?: Aggregations;
|
||||
hits: Hits; // Equivalent SOLR: response > docs
|
||||
aggregations?: Aggregations; // Equivalent SOLR: facets
|
||||
}
|
||||
|
||||
export interface Shards {
|
||||
|
@ -96,7 +78,7 @@ export interface Hits {
|
|||
}
|
||||
|
||||
export interface Total {
|
||||
value: number;
|
||||
value: number; // Equivalent SOLR: response > numFound
|
||||
relation: string;
|
||||
}
|
||||
|
||||
|
@ -114,7 +96,7 @@ export interface HitHighlight {
|
|||
author?: Array<string>;
|
||||
}
|
||||
|
||||
export interface Aggregations {
|
||||
export interface Aggregations { // Equivalent SOLR: FacetFields
|
||||
subjects: Subjects;
|
||||
language: Language;
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue