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:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 10:33 UTC by Joonas Kylmälä
Modified: 2022-01-21 06:55 UTC (History)
3 users (show)

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


Attachments

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:

  pl:
    label: pl
    mappings:
      - 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">
    <target_index>pl:w</target_index>
  </index_control_field>

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

  <!--Index for RDA 264 field-->
  <index_data_field tag="264">
    <target_index>pl:w</target_index>
    <target_index>Provider:w</target_index>
  </index_data_field>

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

  <index_data_field tag="260">
    <target_index>pl:w</target_index>
    <target_index>Provider:w</target_index>
  </index_data_field>

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).