The advanced editor has a hardcoded use of 'zed' for the type of server, which implies Z39.50 and not SRU.
Created attachment 188596 [details] [review] Bug 41136: Allow advanced editor to search SRU servers This patch makes the advanced editor be able to search on SRU servers also, instead of only Z39.50. To test: 0. On a fresh KTD 1. Enable and open the cataloguing advanced editor 2. Click on 'Advanced >>' on the left column => FAIL: Only non-SRU targets are displayed 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: SRU server displayed! => SUCCESS: No authority server is displayed due to the change i.e. behavior remains unchanged besides SRU support 5. Choose the sample SRU server and make a search => SUCCESS: Things work 6. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
This patch makes the advanced editor be able to search on SRU servers also, instead of only Z39.50. To test: 0. On a fresh KTD 1. Enable and open the cataloguing advanced editor 2. Click on 'Advanced >>' on the left column => FAIL: Only non-SRU targets are displayed 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: SRU server displayed! => SUCCESS: No authority server is displayed due to the change i.e. behavior remains unchanged besides SRU support 5. Choose the sample SRU server and make a search => SUCCESS: Things work 6. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Created attachment 188607 [details] [review] Bug 41136: Allow advanced editor to search SRU servers This patch makes the advanced editor be able to search on SRU servers also, instead of only Z39.50. To test: 0. On a fresh KTD 1. Enable and open the cataloguing advanced editor 2. Click on 'Advanced >>' on the left column => FAIL: Only non-SRU targets are displayed 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: SRU server displayed! => SUCCESS: No authority server is displayed due to the change i.e. behavior remains unchanged besides SRU support 5. Choose the sample SRU server and make a search => SUCCESS: Things work 6. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Created attachment 188608 [details] [review] Bug 41136: Allow advanced editor to search SRU servers
This patch makes the advanced editor be able to search on SRU servers also, instead of only Z39.50. To test: 0. On a fresh KTD 1. Enable and open the cataloguing advanced editor 2. Click on 'Advanced >>' on the left column => FAIL: Only non-SRU targets are displayed 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: SRU server displayed! => SUCCESS: No authority server is displayed due to the change i.e. behavior remains unchanged besides SRU support 5. Choose the sample SRU server and make a search => SUCCESS: Things work 6. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
I'm having trouble telling whether it works somehow but ignores the SRU mapping, or it isn't actually using the LC SRU server. If I swap the mapping between the title and ISBN fields, the ISBN field still only searches for ISBN and the title field only searches for titles.
Created attachment 189045 [details] [review] Bug 41136: Allow advanced editor to search SRU servers This patch makes the advanced editor be able to search on SRU servers also, instead of only Z39.50. To test: 0. On a fresh KTD 1. Enable and open the cataloguing advanced editor 2. Click on 'Advanced >>' on the left column => FAIL: Only non-SRU targets are displayed 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: SRU server displayed! => SUCCESS: No authority server is displayed due to the change i.e. behavior remains unchanged besides SRU support 5. Choose the sample SRU server and make a search => SUCCESS: Things work 6. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
And given that if you do something like map LC Call Number to something that should exist, like dc:title, you get the error "Unsupported Use attribute" which is a Z39.50 message and the one you get from just using the LC Call Number search on Library of Congress Z39.50, I really doubt that it's actually doing SRU at all. Since the hostname, port, and database name are all the same for LC's Z39.50 and SRU, I think what we're testing is that the advanced editor ignores the servertype. At the very least, the test plan needs to use a server which doesn't share a hostname, port, and database name between SRU and Z39.50.
(In reply to Phil Ringnalda from comment #9) > And given that if you do something like map LC Call Number to something that > should exist, like dc:title, you get the error "Unsupported Use attribute" > which is a Z39.50 message and the one you get from just using the LC Call > Number search on Library of Congress Z39.50, I really doubt that it's > actually doing SRU at all. Since the hostname, port, and database name are > all the same for LC's Z39.50 and SRU, I think what we're testing is that the > advanced editor ignores the servertype. > > At the very least, the test plan needs to use a server which doesn't share a > hostname, port, and database name between SRU and Z39.50. Are you reporting the SRU feature is all broken? Or just in the advanced editor?
(In reply to Tomás Cohen Arazi (tcohen) from comment #10) > Are you reporting the SRU feature is all broken? Or just in the advanced > editor? I believe that I am reporting that the advanced editor's search implementation doesn't actually perform SRU at all, and that's why it only selects servertype='zed'. https://git.koha-community.org/Koha-community/Koha/src/commit/b385f7b4ec250d1acc058faf5fd9564c7b03ab37/Koha/MetaSearcher.pm#L107 looks fairly supportive of that. Given the info to create another SRU server which does not have the exact same hostname, port, and database name for both its Z39.50 and SRU endpoints (as the Library of Congress does) we would be able to see that the advanced editor's search only does Z39.50, not SRU. Lacking that, I was just using SRU search field mapping as a way to try to see that it wasn't actually doing SRU.