Bug 22771 - Sort by title does not consider second indicator of field 245 (MARC21)
Summary: Sort by title does not consider second indicator of field 245 (MARC21)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: David Gustafsson
QA Contact:
URL:
Keywords:
: 24362 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-25 14:12 UTC by Marjorie Barry-Vila
Modified: 2020-11-30 21:47 UTC (History)
7 users (show)

See Also:
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
Circulation function:


Attachments
Bug 22771: Respect nonfiling indicators for search fields (11.04 KB, patch)
2020-02-27 09:20 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 22771: Respect nonfiling indicators for search fields (10.47 KB, patch)
2020-02-27 09:25 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 22771: Respect nonfiling indicators for search fields (10.47 KB, patch)
2020-02-27 09:26 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 22771: Respect nonfiling indicators for search fields (10.88 KB, patch)
2020-02-27 10:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 22771: Fix mistakes in list of nonfiling character fields (1.05 KB, patch)
2020-03-06 13:09 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 22771: Respect nonfiling indicators for search fields (10.93 KB, patch)
2020-03-06 21:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 22771: Fix mistakes in list of nonfiling character fields (1.10 KB, patch)
2020-03-06 21:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 22771: Respect nonfiling indicators for search fields (10.99 KB, patch)
2020-03-24 12:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 22771: Fix mistakes in list of nonfiling character fields (1.15 KB, patch)
2020-03-24 12:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 22771: (QA follow-up) Fix POD (1.04 KB, patch)
2020-03-24 12:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (kidclamp) 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 (kidclamp) 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 (kidclamp) 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 (ashimema) 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 (kidclamp) 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