diff --git a/packages/clients/textLocator/CHANGELOG.md b/packages/clients/textLocator/CHANGELOG.md
index 6c603035c..88f8d073b 100644
--- a/packages/clients/textLocator/CHANGELOG.md
+++ b/packages/clients/textLocator/CHANGELOG.md
@@ -1,5 +1,10 @@
# CHANGELOG
+## unpublished
+
+- Breaking: Adapt client to new backend API. Previous versions are no longer runnable due the backend API change.
+- Feature: Implement document search, that is, the AddressSearch bar now also offers results for documents and clicking on one will retrieve a list of toponyms from the backend and resolve them against the gazetteer. Previously, we had a "get all documents regarding place" functionality. Now, a "get all places regarding document" feature is implemented. Additionally to the AddressSearch, this can be triggered on documents found in the previously implemented way; the "get all places regarding document" functionality is available from within the GeoSearch result display.
+
## 1.0.0-alpha.0
Initial alpha release.
diff --git a/packages/clients/textLocator/src/addPlugins.ts b/packages/clients/textLocator/src/addPlugins.ts
index 4c3809bb5..33f20ca83 100644
--- a/packages/clients/textLocator/src/addPlugins.ts
+++ b/packages/clients/textLocator/src/addPlugins.ts
@@ -18,6 +18,16 @@ import {
selectResult,
} from './utils/coastalGazetteer/searchToponym'
import { idRegister } from './services'
+import { searchLiterature } from './utils/textLocatorBackend/findLiterature/searchLiterature'
+import { selectLiterature } from './utils/textLocatorBackend/findLiterature/selectLiterature'
+
+export const ids = {
+ groupId: 'groupTL',
+ categoryIdToponym: 'categoryToponym',
+ categoryIdLiterature: 'categoryLiterature',
+ typeGazetteer: 'coastalGazetteer',
+ typeLiterature: 'literature',
+}
// this is fine for list-like setup functions
// eslint-disable-next-line max-lines-per-function
@@ -30,14 +40,29 @@ export const addPlugins = (core) => {
layoutTag: NineLayoutTag.TOP_LEFT,
addLoading: 'plugin/loadingIndicator/addLoadingKey',
removeLoading: 'plugin/loadingIndicator/removeLoadingKey',
+ // @ts-expect-error | Local parameter requirements diverge from type
customSearchMethods: {
- // @ts-expect-error | Local parameter requirements diverge from type
- coastalGazetteer: searchCoastalGazetteerByToponym,
+ [ids.typeGazetteer]: searchCoastalGazetteerByToponym,
+ [ids.typeLiterature]: searchLiterature,
},
customSelectResult: {
- // it's defined like that
- // eslint-disable-next-line @typescript-eslint/naming-convention
- '': selectResult,
+ [ids.categoryIdToponym]: selectResult,
+ [ids.categoryIdLiterature]: selectLiterature,
+ },
+ groupProperties: {
+ [ids.groupId]: {
+ label: `textLocator.addressSearch.${ids.groupId}`,
+ resultDisplayMode: 'categorized',
+ limitResults: 3,
+ },
+ },
+ categoryProperties: {
+ [ids.categoryIdToponym]: {
+ label: 'textLocator.addressSearch.toponym',
+ },
+ [ids.categoryIdLiterature]: {
+ label: 'textLocator.addressSearch.literature',
+ },
},
afterResultComponent: ResultInfo,
}),
diff --git a/packages/clients/textLocator/src/components/ResultInfo.vue b/packages/clients/textLocator/src/components/ResultInfo.vue
index 4d6ebcba8..ee59efd17 100644
--- a/packages/clients/textLocator/src/components/ResultInfo.vue
+++ b/packages/clients/textLocator/src/components/ResultInfo.vue
@@ -10,7 +10,10 @@
fa-info-circle
-
+