Bug 11194

Summary: Add a new index for "Edition Statement" of a MARC Record
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: SearchingAssignee: Olli-Antti Kivilahti <olli-antti.kivilahti>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, olli-antti.kivilahti, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 11194 - Add a new index for "Edition Statement" of a MARC Record
Bug 11194 - Add a new index for "Edition Statement" of a MARC Record
[SIGNED-OFF] Bug 11194: Add a new index for "Edition Statement" of a MARC Record
[PASSED QA] Bug 11194: Add a new index for "Edition Statement" of a MARC Record
Bug 11194: Add a new index for "Edition Statement" of a MARC Record

Description Mathieu Saby 2013-11-03 18:29:52 UTC
Edition of a document (205 in UNIMARC) could be indexed in a specific index.
"Edition" index exists in bib1 for this purpose, but is not used in Koha

M. Saby
Comment 1 Olli-Antti Kivilahti 2015-03-18 11:18:06 UTC Comment hidden (obsolete)
Comment 2 Olli-Antti Kivilahti 2015-03-18 11:20:20 UTC Comment hidden (obsolete)
Comment 3 Olli-Antti Kivilahti 2015-03-18 11:21:52 UTC
There is still an issue regarding sorting this index.
Editions can be given in many ways, eg. 1. 2. 3. I II VI 2nd 3rd 1-2. ...
How to sort them smartly?
This is something for a followup.
Comment 4 Bernardo Gonzalez Kriegel 2015-06-18 16:27:22 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-07-02 14:13:05 UTC
Olli,
You have to provide changes for the record.abs file, have a look at this wiki page: http://wiki.koha-community.org/wiki/MRenvoize/zebra#DOM_indexing
to generate the xsl and xml files from record.abs
Comment 6 Jonathan Druart 2015-07-02 14:19:09 UTC
Maybe not, waiting for an answer from Tomas.
Comment 7 Olli-Antti Kivilahti 2015-07-02 14:21:35 UTC
I know nothing about the record.abs
Is that something new?
I haven't seen other bugs that modify indexes to modify record.abs?
Comment 8 Jonathan Druart 2015-07-02 14:56:38 UTC
(In reply to Olli-Antti Kivilahti from comment #7)
> I know nothing about the record.abs
> Is that something new?
> I haven't seen other bugs that modify indexes to modify record.abs?

It's used for GRS1.
Comment 9 Tomás Cohen Arazi 2015-07-07 14:57:18 UTC
Just a note for people interested on this bug, we don't touch GRS1-related stuff anymore as of the 3.16 release.

record.abs is the file used in GRS-1 for defining indexes.
Comment 10 Kyle M Hall 2015-07-10 16:11:14 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2015-08-05 10:42:03 UTC
Created attachment 41376 [details] [review]
Bug 11194: Add a new index for "Edition Statement" of a MARC Record

Adds the "Edition Statement" MARC-field as a sortable search index in Koha.
This Field is also used by the MARC::Record->edition().

It is mapped to search keyword "edition" and it targets the following MARC-fields:

UNIMARC: all 205-subfields concatenated
MARC21 : all 250-subfields concatenated
NORMARC: all 250-subfields concatenated

After applying this patch a full biblio reindexing needs to be done to make old
records searchable. New Biblios, and Biblios that are part of some operations
(checkin/out/hold/...), are searchable. These generate good test data to test
this feature without fully reindexing the search index.

TEST PLAN:
0. Move the search index and search word definitions from the koha source code
   to the directory where Zebra uses them.
   This is most easiest to do by reinstalling Koha, but can be manually moved
   as well.
1. Find a record with some data in the "Edition Statement" -field.
2. Modify that Record and reindex it.
3. Search with the keyword "edition='<edition_statement>'" where
   <edition_statement> is the stuff you wrote in the MARC-field.
4. Observe the found record.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on MARC21 and UNIMARC, works
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Tomás Cohen Arazi 2015-08-26 13:53:05 UTC
Olli, can u add it to queryparser.yml also please?
Comment 13 Tomás Cohen Arazi 2015-09-07 14:34:36 UTC
I see problems with this patch:

- It forgets to add to queryparser.yml
- It adds to the QueryParser test code, but the numbers look weird.