Bug 33139 - New facetable boolean Elasticsearch field 'has-eresource'.
Summary: New facetable boolean Elasticsearch field 'has-eresource'.
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-05 11:40 UTC by Andreas Jonsson
Modified: 2023-11-08 20:45 UTC (History)
2 users (show)

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


Attachments
Bug 33139 Added "has e-resource" facet for Elasticsearch (7.97 KB, patch)
2023-03-05 11:51 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 33139 Map boolean field has-eresource to MARC21 856$u (973 bytes, patch)
2023-03-05 11:51 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 33139 Map boolean field has-eresource to MARC21 856$u (1.10 KB, patch)
2023-03-05 12:09 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 33139 Map boolean field has-eresource to MARC21 856$u (1.10 KB, patch)
2023-03-05 12:10 UTC, Andreas Jonsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jonsson 2023-03-05 11:40:10 UTC
We would like to have a facetable boolean field in the Elasticsearch
index to quickly filter records that have a link to an electronic
resource in 856$u.  The facets should have labels that makes the purpose
clear.  We can use "Digitally available" and "Only in print" for the negative.
Comment 1 Andreas Jonsson 2023-03-05 11:51:29 UTC
Created attachment 147769 [details] [review]
Bug 33139 Added "has e-resource" facet for Elasticsearch
Comment 2 Andreas Jonsson 2023-03-05 11:51:49 UTC
Created attachment 147770 [details] [review]
Bug 33139 Map boolean field has-eresource to MARC21 856$u
Comment 3 Andreas Jonsson 2023-03-05 12:09:18 UTC
Created attachment 147771 [details] [review]
Bug 33139 Map boolean field has-eresource to MARC21 856$u

Sponsored-by: VTI, Statens väg- och transportforskningsinstitut
Comment 4 Andreas Jonsson 2023-03-05 12:10:07 UTC
Created attachment 147772 [details] [review]
Bug 33139 Map boolean field has-eresource to MARC21 856$u

Sponsored-by: VTI, Statens väg- och transportforskningsinstitut
Comment 5 Katrin Fischer 2023-03-05 14:25:37 UTC
856 can hold a lot of types of e-resources. Some might only be used for scans of TOCs or a front cover scan. I feel like this might be more useful if also the indicator could be taken into account: 

https://www.loc.gov/marc/bibliographic/bd856.html

It looks like second indicator 0 or empty (and maybe 3 and 4) could be useful and would not hurt libraries not setting it.
Comment 6 David Cook 2023-03-05 23:08:48 UTC
(In reply to Katrin Fischer from comment #5)
> 856 can hold a lot of types of e-resources. Some might only be used for
> scans of TOCs or a front cover scan. 

Yeah there can be a lot of links in 856$u that are not really e-resources so I'm not sure about this one...
Comment 7 Andreas Jonsson 2023-03-05 23:28:33 UTC
Currently indicators cannot be specified in the field mappings.

We should specify some syntax for doing this, though.  Maybe:

  has-eresource:
    label: has-eresource
    mandatory: ~
    mappings:
    - facet: 1
      marc_field: 856[14,]u
      marc_type: marc21
      sort: ~
      suggestible: ''
    - facet: 1
      marc_field: 856[7,02]u
      marc_type: marc21
      sort: ~
      suggestible: ''
    opac: 1
    staff_client: 1
    type: boolean

Or:

  has-eresource:
    label: has-eresource
    mandatory: ~
    mappings:
    - facet: 1
      marc_field: 856u
      indicator1: "14"
      marc_type: marc21
      sort: ~
      suggestible: ''
    - facet: 1
      marc_field: 856u
      indicator1: "7"
      indicator2: "02"
      marc_type: marc21
      sort: ~
      suggestible: ''
    opac: 1
    staff_client: 1
    type: boolean

But this should be a separate issue.
Comment 8 Lucas Gass (lukeg) 2023-11-08 20:45:44 UTC
No longer applies cleanly in current master.