Bug 22771

Summary: Sort by title does not consider second indicator of field 245 (MARC21)
Product: Koha Reporter: Marjorie Barry-Vila <marjorie.barry-vila>
Component: Searching - ElasticsearchAssignee: David Gustafsson <glasklas>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: 1joynelson, aspencatteam, david, glasklas, katrin.fischer, martin.renvoize, nick, patrick.robitaille
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This Elasticsearch enhancement strips the initial characters from search fields in accordance with nonfiling character indicators.
Version(s) released in:
20.05.00, 19.11.05
Attachments: Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Fix mistakes in list of nonfiling character fields
Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Fix mistakes in list of nonfiling character fields
Bug 22771: Respect nonfiling indicators for search fields
Bug 22771: Fix mistakes in list of nonfiling character fields
Bug 22771: (QA follow-up) Fix POD

Description Marjorie Barry-Vila 2019-04-25 14:12:22 UTC
Hi,

In marc21, second indicator in field 245 contains number of nonfiling characters.

Sort by title (A-Z, Z-A) with ElasticSearch do not considerate this number.


Has this problem already been reported?

Regards,
Marjorie
Comment 1 Katrin Fischer 2019-06-27 11:48:10 UTC
Note: This works for Zebra, so would be a possible regression.
Comment 2 Katrin Fischer 2020-01-07 15:48:51 UTC
*** Bug 24362 has been marked as a duplicate of this bug. ***
Comment 3 AspenCat Team 2020-02-20 05:50:28 UTC
If alphabetical sort by title is not correct (in that it ignores the 245 second indicator) it should not be offered as an option as it is misleading. One usually sorts by title because there are more records than can easily be reviewed in one page. I have been misled!
Comment 4 David Gustafsson 2020-02-27 09:20:48 UTC
Created attachment 99691 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass
Comment 5 David Gustafsson 2020-02-27 09:25:18 UTC
Created attachment 99692 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass
Comment 6 David Gustafsson 2020-02-27 09:26:19 UTC
Created attachment 99693 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass
Comment 7 David Nind 2020-02-27 10:21:38 UTC
Created attachment 99696 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Gustafsson 2020-03-06 13:09:23 UTC
Created attachment 100270 [details] [review]
Bug 22771: Fix mistakes in list of nonfiling character fields
Comment 9 David Nind 2020-03-06 21:40:19 UTC
Created attachment 100297 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2020-03-06 21:40:23 UTC
Created attachment 100298 [details] [review]
Bug 22771: Fix mistakes in list of nonfiling character fields

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Nick Clemens 2020-03-24 12:19:21 UTC
Created attachment 101551 [details] [review]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens 2020-03-24 12:19:24 UTC
Created attachment 101552 [details] [review]
Bug 22771: Fix mistakes in list of nonfiling character fields

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Nick Clemens 2020-03-24 12:19:27 UTC
Created attachment 101553 [details] [review]
Bug 22771: (QA follow-up) Fix POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Martin Renvoize 2020-03-25 09:43:25 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 15 Joy Nelson 2020-04-03 22:12:39 UTC
QA errors when applied to 19.11.x  not backported
 FAIL   Koha/SearchEngine/Elasticsearch.pm
   OK     critic
   OK     forbidden patterns
   OK     git manipulation
   OK     pod
   OK     pod coverage
   OK     spelling
   FAIL   valid
                Name "Koha::SearchEngine::BIBLIOS_INDEX" used only once: possible typo
Comment 16 Nick Clemens 2020-04-08 10:50:52 UTC
(In reply to Joy Nelson from comment #15)
> QA errors when applied to 19.11.x  not backported
>  FAIL   Koha/SearchEngine/Elasticsearch.pm
>    OK     critic
>    OK     forbidden patterns
>    OK     git manipulation
>    OK     pod
>    OK     pod coverage
>    OK     spelling
>    FAIL   valid
>                 Name "Koha::SearchEngine::BIBLIOS_INDEX" used only once:
> possible typo

That's a false positive I believe, you can ignore
Comment 17 Joy Nelson 2020-04-15 00:01:44 UTC
QA errors ignored. backported to 19.11.x branch for 19.11.05