OpenSearch progress. Stetic changes in result list. Faceted search not started

This commit is contained in:
Porras-Bernardez 2024-06-11 14:38:50 +02:00
parent 9b8b2bd5ac
commit a70e454cbc
6 changed files with 41 additions and 179 deletions

View file

@ -59,6 +59,8 @@ export default class DatasetDetailComponent extends Vue {
}
onSearch(suggestion: Suggestion | string): void {
console.log("onSearch");
const host = window.location.host;
const parts = host.split(".");
if (parts[0] === "doi") {

View file

@ -122,11 +122,15 @@ export default class SearchViewComponent extends Vue {
// Method to trigger a search
onSearch(suggestion: Suggestion | string): void {
console.log("ONSEARCH");
// Reset active filter categories and facet results
this.activeFilterCategories = new ActiveFilterCategories();
this.facets = new FacetResults();
this.searchTerm = suggestion;
console.log("This.searchterm: ", this.searchTerm);
/* Perform faceted search. The method returns an Observable, and the code subscribes to this Observable to handle the response. If the response is successful, it calls the dataHandler method
with the Solr response as a parameter. If there is an error, it calls the errorHandler method with the error message as a parameter */
DatasetService.facetedSearch(suggestion, this.activeFilterCategories, this.solr.core, this.solr.host, undefined).subscribe({