Created attachment 164524 [details] [review] [WIP] Bug 36509: Add Search ID tab to authorities search on staff interface
Created attachment 164576 [details] [review] Bug 36509: Add Search ID tab to authorities search on staff interface This patch makes use of the existing local-number index on the 001 authority field so that authority records can be searched using the 001 ID. This patch works for both Elasticsearch and Zebra search engines. To test: 1. Spin up your ktd with elasticsearch `ktd --es7 up` 2. In the staff interface, open up Koha Administration and search for the SearchEngine system preference. It should be set to Elasticsearch. 3. In another tab, open the staff interface and go to Authorities. 4. Do a normal authorities search, confirm that when you expand the dropdown to order by 'none', the results appear to be in authority-ID ascending order. 5. Choose an ID and go to new the Search ID tab. Search for your ID, confirm it shows as expected. 6. Back in the Koha Administration tab, change the SearchEngine to Zebra. 7. In your Authorities tab, refresh the page. 8. Repeat step 5 and confirm that you can search for the authority by its ID again. Sponsored-by: Education Services Australia SCIS
The patch no longer applies 8-(... git bz apply 36509 Bug 36509 - Add option to search authority records by ID 164576 - Bug 36509: Add Search ID tab to authorities search on staff interface Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36509: Add Search ID tab to authorities search on staff interface Using index info to reconstruct a base tree... M Koha/SearchEngine/Elasticsearch/QueryBuilder.pm M admin/searchengine/elasticsearch/mappings.yaml M koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc Auto-merging admin/searchengine/elasticsearch/mappings.yaml Auto-merging Koha/SearchEngine/Elasticsearch/QueryBuilder.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 36509: Add Search ID tab to authorities search on staff interface
Created attachment 167184 [details] [review] Bug 36509: Add Search ID tab to authorities search on staff interface This patch makes use of the existing local-number index on the 001 authority field so that authority records can be searched using the 001 ID. This patch works for both Elasticsearch and Zebra search engines. To test: 1. Spin up your ktd with elasticsearch `ktd --es7 up` 2. In the staff interface, open up Koha Administration and search for the SearchEngine system preference. It should be set to Elasticsearch. 3. In another tab, open the staff interface and go to Authorities. 4. Do a normal authorities search, confirm that when you expand the dropdown to order by 'none', the results appear to be in authority-ID ascending order. 5. Choose an ID and go to new the Search ID tab. Search for your ID, confirm it shows as expected. 6. Back in the Koha Administration tab, change the SearchEngine to Zebra. 7. In your Authorities tab, refresh the page. 8. Repeat step 5 and confirm that you can search for the authority by its ID again. Sponsored-by: Education Services Australia SCIS
Thanks for fixing the patch so that it applies! I can't get this to work with Elasticsearch (both --es7 and --es8) (I also tried a reset mapping, and reindex). However, it does work in Zebra.