With the Bug 36574 we added a new ES search field isbn-all which makes it possible to find records with the content of the subfield 020 $z (invalid/cancelled ISBN) in general search (by keyword). But still, when performing a search with ISBN-search these records will not be found. Since some libraries deliberately want to find records with only 020 $a with ISBN-search, a system preference would be needed here to be able to customize the ISBN search. The same for ISSNs, with one system preference.
Created attachment 166828 [details] [review] Bug 36798: Add 'SearchCancelAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelAndInvalidISBNandISSN: whether to search for cancelled / invalid forms of ISBN/ISSN when performing ISBN/ISSN search. (By default, with ES, only valid forms, i.e. 020 $a / 022 $a are considered).
Created attachment 166829 [details] [review] Bug 36798: Add ability to search across all ISBNs using the ISBN-search With the Bug 36574 we added a new ES search field isbn-all which makes it possible to find records with the content of the subfield 020 $z (invalid/cancelled ISBN) in general search (by keyword). But still, when performing a search with ISBN-search these records will not be found. Since some libraries deliberately want to find records with only 020 $a with ISBN-search, a system preference would be needed here to be able to customize the ISBN search. The same for ISSNs, with one system preference. Test plan: ========== (ISBN) ------ 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISBN search from Advanced search for 9780141930848. You should get no results. In the general search input field (on the main page) try a search nb:9780141930848 and/or isbn:9780141930848 - you should get no results. 3. Apply the patch, restart_all. 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 9780141930848 in 020 $z). (ISSN) ------ 0. Return to main, delete the bug branch, reset_all == start from fresh. 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISSN search from Advanced search for 1089-6891. You should get no results. In the general search input field (on the main page) try a search ns:1089-6891 and/or issn:1089-6891 - you should get no results. 3. Apply the patch, restart_all. If you have had to apply also the bug 36727, reindex ES with: koha-elasticsearch --rebuild -r -d kohadev (there is a modification of mappings.yaml) 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 1089-6891 in 022 $y). Sponsored-by: Ignatianum University in Cracow
Created attachment 166830 [details] [review] Bug 36798: Unit tests Added unit tests.
Created attachment 166836 [details] [review] Bug 36798: Add 'SearchCancelAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelAndInvalidISBNandISSN: whether to search for cancelled / invalid forms of ISBN/ISSN when performing ISBN/ISSN search. (By default, with ES, only valid forms, i.e. 020 $a / 022 $a are considered). Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 166837 [details] [review] Bug 36798: Add ability to search across all ISBNs using the ISBN-search With the Bug 36574 we added a new ES search field isbn-all which makes it possible to find records with the content of the subfield 020 $z (invalid/cancelled ISBN) in general search (by keyword). But still, when performing a search with ISBN-search these records will not be found. Since some libraries deliberately want to find records with only 020 $a with ISBN-search, a system preference would be needed here to be able to customize the ISBN search. The same for ISSNs, with one system preference. Test plan: ========== (ISBN) ------ 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISBN search from Advanced search for 9780141930848. You should get no results. In the general search input field (on the main page) try a search nb:9780141930848 and/or isbn:9780141930848 - you should get no results. 3. Apply the patch, restart_all. 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 9780141930848 in 020 $z). (ISSN) ------ 0. Return to main, delete the bug branch, reset_all == start from fresh. 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISSN search from Advanced search for 1089-6891. You should get no results. In the general search input field (on the main page) try a search ns:1089-6891 and/or issn:1089-6891 - you should get no results. 3. Apply the patch, restart_all. If you have had to apply also the bug 36727, reindex ES with: koha-elasticsearch --rebuild -r -d kohadev (there is a modification of mappings.yaml) 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 1089-6891 in 022 $y). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 166838 [details] [review] Bug 36798: Unit tests Added unit tests. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Sorry Janusz, this no longer applies cleanly. Good new, seems like a simple rebase of searching.pref.
Created attachment 171906 [details] [review] Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN: whether to search for cancelled / invalid forms of ISBN/ISSN when performing ISBN/ISSN search. (By default, with ES, only valid forms, i.e. 020 $a / 022 $a are considered). Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 171907 [details] [review] Bug 36798: Add ability to search across all ISBNs using the ISBN-search With the Bug 36574 we added a new ES search field isbn-all which makes it possible to find records with the content of the subfield 020 $z (invalid/cancelled ISBN) in general search (by keyword). But still, when performing a search with ISBN-search these records will not be found. Since some libraries deliberately want to find records with only 020 $a with ISBN-search, a system preference would be needed here to be able to customize the ISBN search. The same for ISSNs, with one system preference. Test plan: ========== (ISBN) ------ 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISBN search from Advanced search for 9780141930848. You should get no results. In the general search input field (on the main page) try a search nb:9780141930848 and/or isbn:9780141930848 - you should get no results. 3. Apply the patch, restart_all. 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelledAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 9780141930848 in 020 $z). (ISSN) ------ 0. Return to main, delete the bug branch, reset_all == start from fresh. 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISSN search from Advanced search for 1089-6891. You should get no results. In the general search input field (on the main page) try a search ns:1089-6891 and/or issn:1089-6891 - you should get no results. 3. Apply the patch, restart_all. If you have had to apply also the bug 36727, reindex ES with: koha-elasticsearch --rebuild -r -d kohadev (there is a modification of mappings.yaml) 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelledAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 1089-6891 in 022 $y). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 171908 [details] [review] Bug 36798: Unit tests Added unit tests. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
(In reply to Lucas Gass from comment #7) > Sorry Janusz, this no longer applies cleanly. Good new, seems like a simple > rebase of searching.pref. Thanks, Lucas. Sure--it has been four months since the patch was ready, so no wonder... Rebased + tiny spelling correction.
Created attachment 171935 [details] [review] Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN: whether to search for cancelled / invalid forms of ISBN/ISSN when performing ISBN/ISSN search. (By default, with ES, only valid forms, i.e. 020 $a / 022 $a are considered). Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 171936 [details] [review] Bug 36798: Add ability to search across all ISBNs using the ISBN-search With the Bug 36574 we added a new ES search field isbn-all which makes it possible to find records with the content of the subfield 020 $z (invalid/cancelled ISBN) in general search (by keyword). But still, when performing a search with ISBN-search these records will not be found. Since some libraries deliberately want to find records with only 020 $a with ISBN-search, a system preference would be needed here to be able to customize the ISBN search. The same for ISSNs, with one system preference. Test plan: ========== (ISBN) ------ 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISBN search from Advanced search for 9780141930848. You should get no results. In the general search input field (on the main page) try a search nb:9780141930848 and/or isbn:9780141930848 - you should get no results. 3. Apply the patch, restart_all. 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelledAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 9780141930848 in 020 $z). (ISSN) ------ 0. Return to main, delete the bug branch, reset_all == start from fresh. 1. Have the ktd with with ES enabled. 2. With standard ktd test data, try to perform a ISSN search from Advanced search for 1089-6891. You should get no results. In the general search input field (on the main page) try a search ns:1089-6891 and/or issn:1089-6891 - you should get no results. 3. Apply the patch, restart_all. If you have had to apply also the bug 36727, reindex ES with: koha-elasticsearch --rebuild -r -d kohadev (there is a modification of mappings.yaml) 4. Repeat p. 2 -- you should still get no results. 5. Enable SearchCancelledAndInvalidISBNandISSN syspref. 6. Repeat p. 2 -- now you should get one record (having 1089-6891 in 022 $y). Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 171937 [details] [review] Bug 36798: Unit tests Added unit tests. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>