[RM-32094]: <NMU> แก้ไข index ให้เก็บข้อมูลจาก 008 และ 260/264$c (เคยทำไปแล้ว แต่ยังใช้ไม่ได้ เช็คใหม่อีกทีค่ะ )

Viewed 1

Problem Summary

From Redmine:
(เคยทำไปแล้ว แต่ยังใช้ไม่ได้ เช็คใหม่อีกทีค่ะ )

ma onsite 11/09/68

Root Cause Analysis

1 Answers

Solution / Workaround

  1. Fork and make a symlink
    from /usr/share/koha/intranet/cgi-bin/admin/searchengine/elasticsearch/mappings.yaml
    to /srv/punsarn/site/misc/elasticsearch/mappings.yaml
  2. เพิ่ม date-of-publication
diff --git a/misc/elasticsearch/mappings.yaml b/misc/elasticsearch/mappings.yaml
index 2644bea..182b340 100644
--- a/misc/elasticsearch/mappings.yaml
+++ b/misc/elasticsearch/mappings.yaml
@@ -1465,6 +1465,16 @@ biblios:
         marc_type: marc21
         sort: 1
         suggestible: ''
+      - facet: ''
+        marc_field: 260c
+        marc_type: marc21
+        sort: 1
+        suggestible: ''
+      - facet: ''
+        marc_field: 264c
+        marc_type: marc21
+        sort: 1
+        suggestible: ''
       - facet: ''
         marc_field: 100a_/9-12
         marc_type: unimarc
  1. rebuild elasticsearch
    sudo koha-elasticsearch --rebuild -r -d -p 2 -v nmu

Verification Steps

  1. In staff interface. Go to any bib record
  2. Go to url https://staff.koha.library.nmu.ac.th/cgi-bin/koha/catalogue/showelastic.pl?id=[biblionumber]
    Example
  3. You should see date-of-publication contain date from 008 or 260$c or 264$c
Related