We would like to add the following tags and subfields to the existing subject index for Elasticsearch MARC21, as used by the "subject" and "subject as phrase" advanced search dropdown options: * 600abc (currently 600a) * 610abcdnty (currently 610a and 610t) * 630amnoprsxyz (currently 630n and 630r) Explanation to justify these mappings: * To search subject added entry, personal name ($600), numeration ($b) and titles and other words associated with name ($c). e.g. 600 $a Elizabeth $n I $c Queen of England. * To search subject added entry, corporate name (610), subordinate unit ($b), location of meeting ($c), date of meeting ($d), number of part/section of meeting ($n), title of a work ($t) and chronological subdivision ($y) e.g. 610 $a International Labour Organisation $b European Regional Conference $n (2nd :$d 1968 :$c Geneva, Switzerland). e.g. 610 $a France. $t Constitution. e.g. 610 $a United States $b Army $b Cavalry History $y Civil War, 1861-1865. * To search subject added entry, uniform title (630 $a), number of part/section of a work($n), name of part/section of work ($p), general subdivision ($x), chronological subdivision ($y), geographical subdivision ($z). * Also, search subject added entry, uniform title (630), for medium of performance for music ($m), arranged statement of music ($o), key for music ($r) and version ($s).
Created attachment 167252 [details] [review] Bug 36852: Enhance Elasticsearch subject, subject as phrase MARC21 index mappings Add the following tags and subfields to the existing subject index for Elasticsearch MARC21, as used by the "subject" and "subject as phrase" advanced search dropdown options: 600abc (currently 600a), 610abcdnty (currently 610a and 610t), 630amnoprsxyz (currently 630n and 630r) Sponsored-by: Educational Services Australia SCIS
Created attachment 167299 [details] [review] Bug 36852: Enhance Elasticsearch subject, subject as phrase MARC21 index mappings Add the following tags and subfields to the existing subject index for Elasticsearch MARC21, as used by the "subject" and "subject as phrase" advanced search dropdown options: 600abc (currently 600a), 610abcdnty (currently 610a and 610t), 630amnoprsxyz (currently 630n and 630r) Sponsored-by: Educational Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com>
Testing notes using KTD: 1. Start up KTD with Elasticsearch: ktd --es8 up 2. Edit a record and add unique values as follows (I edited Programming Perl, 262): . 600 $a Elizabeth $b IV $c Queen of England. . 610 $a International Labour Organisation $b European Regional Conference $n (2nd :$d 1968 :$c Geneva, Switzerland). . 630 $a Ukrainian weekly $n XXI $r C sharp $s 2024 $vIndexes $vPeriodicals. . Note: Need to edit BKS framework to make 610n and 630mnoprs subfields visible in the editor for KTD) Mappings - current and changes: * 600a => 600abc * 610a and 610t => 610abcdnty * 630n and 630r=> 630amnoprsxyz 3. Do a search for the terms in the subfields not currently using the 'Subject' and 'Subject as a phrase' indexes in the staff interface advanced search. ==> Result: Should get a result when using values in the subfields that are mapped, but no result where the subfields are not mapped. 4. Apply this patch and restart all services (restart_all). 5. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page) 6. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev 7. Alternative to steps 5 and 6: reset_all then repeat step 2 8. Repeat step 3 ==> Result: Should now get a result when using values in the subfields that are now mapped (that weren't previously).
Created attachment 169066 [details] [review] Bug 36852: Enhance Elasticsearch subject, subject as phrase MARC21 index mappings Add the following tags and subfields to the existing subject index for Elasticsearch MARC21, as used by the "subject" and "subject as phrase" advanced search dropdown options: 600abc (currently 600a), 610abcdnty (currently 610a and 610t), 630amnoprsxyz (currently 630n and 630r) Sponsored-by: Educational Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thomas Klausner <domm@plix.at>
Same issue as bug #36850
Hi! We have a client who has a similar-but-opposite problem regarding subject searching. When looking for a specific "subject as phrase", Koha returns also more general subjects. eg. su,phr:"Europe" returns: "Europe", "European brotherhood", "European ancestry" If we were to add 610$b "European Regional Conference" to subject-index, su,phr:"Europe" would also return the record with a mention of the conference. Which might not be desirable. My point: - Presently, if this change is accepted, it would exaggerate our client's search challenge. - The change is good, when the way the subject-index phrase search is tokenized in the ES search index, is changed: -- "subject as phrase"-search needs to use it's own search index, 'subject-phrase'. -- 'subject-phrase' needs to follow its own rules of search term tokenization. This is achieved using a Elastic field-specific analyzer. --- It must preserve the way the words are written exactly within a subfield. So tokenize the complete subject word/words as a single indexed search token. eg. 610$a "International Labour Organisation" is tokenized to index as "International Labour Organisation" instead of the current way: "International", "Labour", "Organisation" --- Rewire the advancedsearch to use the new 'subject-phrase'-index