Summary: | Embed geographic coordinates when indexing biblios linked to GEOGR_NAME authorities | ||
---|---|---|---|
Product: | Koha | Reporter: | HKS3 Tadeusz Sośnierz <tadeusz> |
Component: | Searching - Elasticsearch | Assignee: | HKS3 Tadeusz Sośnierz <tadeusz> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | phil |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 37821: Embed geographic coordinates from GEOGR_NAME authority when indexing records |
Description
HKS3 Tadeusz Sośnierz
2024-09-03 11:46:25 UTC
Created attachment 170979 [details] [review] Bug 37821: Embed geographic coordinates from GEOGR_NAME authority when indexing records Test plan: ## Preparation 1. Set up koha-testing-docker with --es8 2. Go to "The beginnings of Rome" in staff view (http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=140) 3. Go to the linked authority record ("Rome -- History -- Kings, 753-510 B.C") by clicking the looking glass. Should end up at http://localhost:8081/cgi-bin/koha/authorities/detail.pl?authid=169 4. Click "edit record" 5. Add field 034 ("CODED CARTOGRAPHIC MATHEMATICAL DATA") 6. For subfieds `s` and `t` enter the coordinates for Rome: 41.89193 and 12.51133 7. Save the authority record ## Testing 8. In koha-shell, issue the elasticsearch query: ``` curl -X GET "es:9200/koha_kohadev_biblios/_search?pretty" -H 'Content-Type: application/json' -d' { "query": { "bool": { "must": { "match_all": {} }, "filter": { "geo_distance": { "distance": "100km", "geolocation": { "lat": 41.89, "lon": 12.51 } } } } } } ' ``` Note no results. 9. Apply the patch 10. Rebuild the index with `koha-elasticsearch --rebuild kohadev` 11. Re-run the elasticsearch query 12. Notice the expected book pop up |