Summary: | Missing authtype filter in auth_finder.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Searching - Elasticsearch | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | major | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22997 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.04
|
|
Circulation function: | |||
Attachments: |
Bug 23004: Missing authtype filter in auth_finder.pl
Bug 23004: Unit test Bug 23004: Missing authtype filter in auth_finder.pl Bug 23004: Missing authtype filter in auth_finder.pl Bug 23004: Unit test Bug 23004: Missing authtype filter in auth_finder.pl Bug 23004: Unit test |
Description
Fridolin Somers
2019-05-29 06:13:47 UTC
Created attachment 90174 [details] [review] Bug 23004: Missing authtype filter in auth_finder.pl In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type. This limit is missing with Elasticsearch. This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part. Test plan : 1) Use Elasticsearch 2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien" 3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien" 4) Create a biblio record 5) Use tag editor on a author field (700 in UNIMARC) 6) Seach for "Tolkien" in $a without patch : you see the 2 authorities in results with patch : you see only the correct authority in results (NP in UNIMARC) 7) Check search in authorities-home.pl is still OK Hi Frido, please provide tests to cover this change :) Created attachment 92056 [details] [review] Bug 23004: Unit test Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Created attachment 92632 [details] [review] Bug 23004: Missing authtype filter in auth_finder.pl In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type. This limit is missing with Elasticsearch. This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part. Test plan : 1) Use Elasticsearch 2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien" 3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien" 4) Create a biblio record 5) Use tag editor on a author field (700 in UNIMARC) 6) Seach for "Tolkien" in $a without patch : you see the 2 authorities in results with patch : you see only the correct authority in results (NP in UNIMARC) 7) Check search in authorities-home.pl is still OK Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 92634 [details] [review] Bug 23004: Missing authtype filter in auth_finder.pl In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type. This limit is missing with Elasticsearch. This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part. Test plan : 1) Use Elasticsearch 2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien" 3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien" 4) Create a biblio record 5) Use tag editor on a author field (700 in UNIMARC) 6) Seach for "Tolkien" in $a without patch : you see the 2 authorities in results with patch : you see only the correct authority in results (NP in UNIMARC) 7) Check search in authorities-home.pl is still OK Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 92635 [details] [review] Bug 23004: Unit test Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 92670 [details] [review] Bug 23004: Missing authtype filter in auth_finder.pl In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type. This limit is missing with Elasticsearch. This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part. Test plan : 1) Use Elasticsearch 2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien" 3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien" 4) Create a biblio record 5) Use tag editor on a author field (700 in UNIMARC) 6) Seach for "Tolkien" in $a without patch : you see the 2 authorities in results with patch : you see only the correct authority in results (NP in UNIMARC) 7) Check search in authorities-home.pl is still OK Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 92671 [details] [review] Bug 23004: Unit test Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Nice work! Pushed to master for 19.11.00 Pushed to 19.05.x for 19.05.04 backported to 18.11.x for 18.11.11 |