Bug 24678 - Add missing search fields to Elasticsearch mappings
Summary: Add missing search fields to Elasticsearch mappings
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
Depends on:
Reported: 2020-02-18 10:33 UTC by Joonas Kylmälä
Modified: 2022-10-20 13:32 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2020-02-18 10:33:04 UTC
The Elasticsearch mappings.yaml file is still missing a lot of search fields compared to Zebra. For example Zebra has 264a and 264c separately indexed but Elasticsearch only has 264 indexed in one search field 'provider'.

You can compare MARC21 search mappings with the files:
- etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
- admin/searchengine/elasticsearch/mappings.yaml
Comment 1 Katrin Fischer 2020-03-16 00:48:40 UTC
I've tried to provide a patch for 264, but ran into a mismatch between Zebra and Elasticsearch:

    label: pl
      - facet: ''
        marc_field: '008_/15-17'
        marc_type: marc21
        sort: ~
        suggestible: ''
      - facet: ''
        marc_field: '008_/15-17'
        marc_type: normarc
        sort: ~
        suggestible: ''

The Zebra files are also confusing:

  <index_control_field tag="008" offset="15" length="3">

  <!-- RDA 264$a      pl:w,pl:p-->
  <index_subfields tag="264" subfields="a">

  <!--Index for RDA 264 field-->
  <index_data_field tag="264">

  <!--record.abs line 119: melm 260$a      pl:w,pl:p-->
  <index_subfields tag="260" subfields="a">

  <index_data_field tag="260">

At the moment it's kind of a mix up between place of publication (26x$a) and date of publication (008 pos.15... and 26x$c).
Comment 2 Fridolin Somers 2022-10-20 08:08:07 UTC
Still valid ?
Comment 3 Caroline Cyr La Rose 2022-10-20 13:32:12 UTC
Bug 28378 and Bug 28391 add 264 mappings to the default ES mappings.

There isn't one specifically for 264$a. I don't know if it's still needed...