Fixing facetedsearch

This commit is contained in:
Porras-Bernardez 2024-06-19 11:12:53 +02:00
parent d135ab2d50
commit 95c7c8ba7b
8 changed files with 246 additions and 210 deletions

View file

@ -20,7 +20,7 @@ export default class FacetCategory extends Vue {
filterName!: string;
get alias(): string {
console.log("filterName:", this.filterName);
// console.log("filterName:", this.filterName);
return this.filterName == "datatype" ? "doctype" : this.filterName;
}
@ -54,7 +54,7 @@ export default class FacetCategory extends Vue {
@Emit("filter")
activateItem(filterItem: FacetItem): FacetItem {
// console.log(filterItem);
// console.log("ActivateItem");
filterItem.category = this.alias;
filterItem.active = true;
// this.$emit("filter", filterItem);

View file

@ -8,9 +8,6 @@
<!-- e.g.language -->
<ul class="filter-items list-unstyled" v-bind:class="{ limited: facetItems.length > 1 && collapsed }">
<li v-for="(item, index) in facetItems" v-bind:key="index" class="list-group-item titlecase">
{{ item.active }}
{{ item.val }}
{{ item.count }} //
<!-- <span :class="item.Active ? 'disabled' : ''" @click.prevent="activateItem(item)">{{ item.val }} ({{ item.count }}) </span> -->
<span v-bind:class="item.active ? 'disabled' : ''" @click.prevent="activateItem(item)">{{ item.val }} ({{ item.count }}) </span>
</li>

View file

@ -2,12 +2,12 @@
// import debounce from 'lodash/debounce';
// import { DatasetService } from "../../services/dataset.service";
import DatasetService from "../../services/dataset.service";
import { SolrSettings } from "@/models/solr"; // PENDING USE
// import { SolrSettings } from "@/models/solr"; // PENDING USE
import { OpenSettings } from "@/models/solr";
import { Component, Vue, Prop, Emit } from "vue-facing-decorator";
import { Dataset, Suggestion, SearchType } from "@/models/dataset";
import { SOLR_HOST, SOLR_CORE } from "@/constants";
// import { SOLR_HOST, SOLR_CORE } from "@/constants";
import { OPEN_HOST, OPEN_CORE } from "@/constants"; // PENDING USE
import { HitHighlight } from "@/models/headers";
@ -38,10 +38,10 @@ export default class VsInput extends Vue {
private loading = false; // Loading state indicator
private selectedIndex = -1; // Index of the currently selected suggestion
private solr: SolrSettings = {
core: SOLR_CORE, //"rdr_data", // SOLR.core;
host: SOLR_HOST, //"tethys.at",
};
// private solr: SolrSettings = {
// core: SOLR_CORE, //"rdr_data", // SOLR.core;
// host: SOLR_HOST, //"tethys.at",
// };
private openSearch: OpenSettings = {
core: OPEN_CORE, //"rdr_data", // SOLR.core;