diff --git a/src/App.vue b/src/App.vue
index 9b042da..afc4c9b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -34,7 +34,7 @@
- SEARCH
+ OPENSEARCH
diff --git a/src/components/vs-input/vs-input.ts b/src/components/vs-input/vs-input.ts
index ad5bb36..00f935b 100644
--- a/src/components/vs-input/vs-input.ts
+++ b/src/components/vs-input/vs-input.ts
@@ -3,12 +3,16 @@
// import { DatasetService } from "../../services/dataset.service";
import DatasetService from "../../services/dataset.service";
import { SolrSettings } from "@/models/solr";
+
+import { OpenSettings } from "@/models/solr";
// import { ref } from "vue";
import { Component, Vue, Prop, Emit } from "vue-facing-decorator";
// import { Prop, Emit } from "vue-property-decorator";
import { Dataset, Suggestion, SearchType } from "@/models/dataset";
import { SOLR_HOST, SOLR_CORE } from "@/constants";
+import { OPEN_HOST, OPEN_CORE } from "@/constants";
+
@Component({
name: "VsInput",
})
@@ -36,6 +40,14 @@ export default class VsInput extends Vue {
// core: "test_data", // SOLR.core;
// host: "repository.geologie.ac.at",
};
+
+ private open: OpenSettings = {
+ core: OPEN_CORE, //"rdr_data", // SOLR.core;
+ host: OPEN_HOST, //"tethys.at",
+ // core: "test_data", // SOLR.core;
+ // host: "repository.geologie.ac.at",
+ };
+
// private rdrAPI!: DatasetService;
itemRefs!: Array;
emits = ["filter"];
@@ -133,6 +145,7 @@ export default class VsInput extends Vue {
}
searchChanged(): void {
+ console.log("Search changed!");
this.selectedIndex = -1;
// Let's warn the parent that a change was made
// this.$emit("input", this.display);
@@ -155,6 +168,7 @@ export default class VsInput extends Vue {
}
private request(): void {
+ console.log("searchTerm");
DatasetService.searchTerm(this.display, this.solr.core, this.solr.host).subscribe({
next: (res: Dataset[]) => this.dataHandler(res),
error: (error: string) => this.errorHandler(error),
diff --git a/src/constants.ts b/src/constants.ts
index acd7381..56a2a29 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -5,6 +5,10 @@ declare const VUE_API: string;
declare const SOLR_HOST: string;
declare const SOLR_CORE: string;
+// OPENSEARCH
+declare const OPEN_HOST: string;
+declare const OPEN_CORE: string;
+
// const _EDGE_URL = EDGE_URL;
// const _POINT_URL = POINT_URL;
const _APP_URL = APP_URL;
@@ -12,9 +16,17 @@ const _VUE_API = VUE_API;
const _SOLR_HOST = SOLR_HOST;
const _SOLR_CORE = SOLR_CORE;
+// OPENSEARCH
+const _OPEN_HOST = OPEN_HOST;
+const _OPEN_CORE = OPEN_CORE;
+
// export { _EDGE_URL as EDGE_URL };
// export { _POINT_URL as POINT_URL };
export { _APP_URL as APP_URL };
export { _VUE_API as VUE_API };
export { _SOLR_HOST as SOLR_HOST };
export { _SOLR_CORE as SOLR_CORE };
+
+// OPENSEARCH
+export { _OPEN_HOST as OPEN_HOST };
+export { _OPEN_CORE as OPEN_CORE };
diff --git a/src/models/headers.ts b/src/models/headers.ts
index 7825a7e..032de97 100644
--- a/src/models/headers.ts
+++ b/src/models/headers.ts
@@ -7,6 +7,14 @@ export interface SolrResponse {
// facet_counts: FacetCount;
}
+// OPENSEARCH
+export interface OpenResponse {
+ responseHeader: ResponseHeader;
+ response: ResponseContent;
+ facets: FacetFields;
+ // facet_counts: FacetCount;
+}
+
export interface ResponseHeader {
status: boolean;
QTime: number;
diff --git a/src/models/solr.ts b/src/models/solr.ts
index 3e87ca2..0061c6a 100644
--- a/src/models/solr.ts
+++ b/src/models/solr.ts
@@ -3,6 +3,11 @@ export interface SolrSettings {
host: string;
}
+export interface OpenSettings {
+ core: string;
+ host: string;
+}
+
export class ActiveFilterCategories {
// count: number;
// language!: Array;
diff --git a/src/views/search-view/search-view-component.ts b/src/views/search-view/search-view-component.ts
index 40475c8..676ef47 100644
--- a/src/views/search-view/search-view-component.ts
+++ b/src/views/search-view/search-view-component.ts
@@ -4,15 +4,20 @@ import VsResult from "@/components/vs-result/vs-result.vue";
import FacetCategory from "@/components/face-category/facet-category.vue";
import ActiveFacetCategory from "@/components/active-facet-category/active-facet-category.vue";
import { SolrSettings } from "@/models/solr";
+
+import { OpenSettings } from "@/models/solr";
// import { DatasetService } from "@/services/dataset.service";
import DatasetService from "../../services/dataset.service";
import { Suggestion, Dataset, SearchType } from "@/models/dataset";
-import { SolrResponse, FacetFields, FacetItem, FacetResults, FacetInstance } from "@/models/headers";
+// import { SolrResponse, FacetFields, FacetItem, FacetResults, FacetInstance } from "@/models/headers";
+import { OpenResponse, SolrResponse, FacetFields, FacetItem, FacetResults, FacetInstance } from "@/models/headers";
import { ActiveFilterCategories } from "@/models/solr";
import { SOLR_HOST, SOLR_CORE } from "@/constants";
import { IPagination } from "@/models/pagination";
import PaginationComponent from "@/components/PaginationComponent.vue";
+import { OPEN_HOST, OPEN_CORE } from "@/constants";
+
// Decorate the component and define its name and components
@Component({
name: "SearchViewComponent",
@@ -54,6 +59,11 @@ export default class SearchViewComponent extends Vue {
host: SOLR_HOST, //"tethys.at",
};
+ private open: OpenSettings = {
+ core: OPEN_CORE, //"rdr_data", // SOLR.core;
+ host: OPEN_HOST, //"tethys.at",
+ };
+
private error = "";
// Computed property to get search term as string
diff --git a/vue.config.cjs b/vue.config.cjs
index a15c57a..6f43f5f 100644
--- a/vue.config.cjs
+++ b/vue.config.cjs
@@ -91,6 +91,9 @@ module.exports = {
VUE_API: JSON.stringify(process.env.VUE_API),
SOLR_HOST: JSON.stringify(process.env.SOLR_HOST),
SOLR_CORE: JSON.stringify(process.env.SOLR_CORE),
+ // OPENSEARCH
+ OPEN_HOST: JSON.stringify(process.env.OPEN_HOST),
+ OPEN_CORE: JSON.stringify(process.env.OPEN_CORE),
}),
// new NodePolyfillPlugin(),
],