Z39.50 - Yaz-client examples - CQL

Hello, I've been making use of the wiki documentation at https://wiki.evergreen-ils.org/doku.php?id=evergreen-admin:sru_and_z39.50 when I need to setup and test the Z39.50 server. There is a section for testing the Z39.50 server using the yaz-client. But it always confuses me because the example shows example searches that don't work. And there wasn't an example that shows how to search using Z39.50 bib attributes. (I added one). I would like to remove the examples of non working searches, unless it is just something that I'm doing wrong. It seems to me that CQL search syntax doesn't work for Z39.50, that only works for SRU. RPL is the only search syntax that works. So the example of Z> find "dc.title=zone and dc.author=king" is in CQL but gets sent as a server choice search for the keywords "dc.title=zone and dc.author=king" and doesn't return anything. The next example of Z> find "dead zone" returns results because it gets sent as a serverchoice query which is keyword by default. Jun 13 14:21:10 virt-egutil2 z3950[1886134]: search: translated '@attrset Bib-1 "dead zone"' to '"dead zone"' Jun 13 14:21:10 virt-egutil2 z3950[1886134]: 14:21:10-13/06 simple2zoom(502) [request] Search LARL OK 5 3 1+0 RPN @attrset Bib-1 "dead zone" [2025-06-13 14:21:10] /usr/sbin/apache2 [INFO:243740:SuperCat.pm:2002:1749790802243740321] SRU search string ["dead zone"] converted to [(srw.serverchoice:"dead zone") site:LARL] Is my understanding correct? Does it make sense to remove that CQL example? Josh [image: Company logo] *Josh Stompro* IT Director stomproj@gsuite.larl.org | 218-233-3757 ext. 139 | 218-790-2110 *Lake Agassiz Regional Library * 118 5th ST S Moorhead MN 56560 www.larl.org *Our mission is to enrich lives and strengthen communities.*

I have what may be a silly question. I’ve been thinking that adding a check against z39.50 should be part of my regular routine, rather than just verifying that the service is working. Do you do this test from internally or from a server that is external to your network? Would there be a benefit from running it externally other than verifying the port is open? -Jon On Fri, Jun 13, 2025 at 12:28 PM Josh Stompro via Evergreen-dev < evergreen-dev@list.evergreen-ils.org> wrote:
Hello, I've been making use of the wiki documentation at https://wiki.evergreen-ils.org/doku.php?id=evergreen-admin:sru_and_z39.50 when I need to setup and test the Z39.50 server.
There is a section for testing the Z39.50 server using the yaz-client. But it always confuses me because the example shows example searches that don't work. And there wasn't an example that shows how to search using Z39.50 bib attributes. (I added one).
I would like to remove the examples of non working searches, unless it is just something that I'm doing wrong.
It seems to me that CQL search syntax doesn't work for Z39.50, that only works for SRU. RPL is the only search syntax that works.
So the example of
Z> find "dc.title=zone and dc.author=king"
is in CQL but gets sent as a server choice search for the keywords "dc.title=zone and dc.author=king" and doesn't return anything.
The next example of Z> find "dead zone" returns results because it gets sent as a serverchoice query which is keyword by default.
Jun 13 14:21:10 virt-egutil2 z3950[1886134]: search: translated '@attrset Bib-1 "dead zone"' to '"dead zone"' Jun 13 14:21:10 virt-egutil2 z3950[1886134]: 14:21:10-13/06 simple2zoom(502) [request] Search LARL OK 5 3 1+0 RPN @attrset Bib-1 "dead zone" [2025-06-13 14:21:10] /usr/sbin/apache2 [INFO:243740:SuperCat.pm:2002:1749790802243740321] SRU search string ["dead zone"] converted to [(srw.serverchoice:"dead zone") site:LARL]
Is my understanding correct? Does it make sense to remove that CQL example? Josh
[image: Company logo] *Josh Stompro* IT Director stomproj@gsuite.larl.org | 218-233-3757 ext. 139 | 218-790-2110 *Lake Agassiz Regional Library * 118 5th ST S Moorhead MN 56560 www.larl.org *Our mission is to enrich lives and strengthen communities.* _______________________________________________ Evergreen-dev mailing list -- evergreen-dev@list.evergreen-ils.org To unsubscribe send an email to evergreen-dev-leave@list.evergreen-ils.org

Hi, Running the check externally (in addition to internally) would be of benefit to verify that any port-forwarding or proxying in front of your Z39.50 server is working correctly - especially if there are external systems such as discovery layers or ILL brokers that use Z39.50 to check item availability. Regards, Galen On Fri, Jun 13, 2025 at 4:57 PM JonGeorg SageLibrary via Evergreen-dev < evergreen-dev@list.evergreen-ils.org> wrote:
I have what may be a silly question. I’ve been thinking that adding a check against z39.50 should be part of my regular routine, rather than just verifying that the service is working. Do you do this test from internally or from a server that is external to your network? Would there be a benefit from running it externally other than verifying the port is open? -Jon
On Fri, Jun 13, 2025 at 12:28 PM Josh Stompro via Evergreen-dev < evergreen-dev@list.evergreen-ils.org> wrote:
Hello, I've been making use of the wiki documentation at https://wiki.evergreen-ils.org/doku.php?id=evergreen-admin:sru_and_z39.50 when I need to setup and test the Z39.50 server.
There is a section for testing the Z39.50 server using the yaz-client. But it always confuses me because the example shows example searches that don't work. And there wasn't an example that shows how to search using Z39.50 bib attributes. (I added one).
I would like to remove the examples of non working searches, unless it is just something that I'm doing wrong.
It seems to me that CQL search syntax doesn't work for Z39.50, that only works for SRU. RPL is the only search syntax that works.
So the example of
Z> find "dc.title=zone and dc.author=king"
is in CQL but gets sent as a server choice search for the keywords "dc.title=zone and dc.author=king" and doesn't return anything.
The next example of Z> find "dead zone" returns results because it gets sent as a serverchoice query which is keyword by default.
Jun 13 14:21:10 virt-egutil2 z3950[1886134]: search: translated '@attrset Bib-1 "dead zone"' to '"dead zone"' Jun 13 14:21:10 virt-egutil2 z3950[1886134]: 14:21:10-13/06 simple2zoom(502) [request] Search LARL OK 5 3 1+0 RPN @attrset Bib-1 "dead zone" [2025-06-13 14:21:10] /usr/sbin/apache2 [INFO:243740:SuperCat.pm:2002:1749790802243740321] SRU search string ["dead zone"] converted to [(srw.serverchoice:"dead zone") site:LARL]
Is my understanding correct? Does it make sense to remove that CQL example? Josh
[image: Company logo] *Josh Stompro* IT Director stomproj@gsuite.larl.org | 218-233-3757 ext. 139 | 218-790-2110 *Lake Agassiz Regional Library * 118 5th ST S Moorhead MN 56560 www.larl.org *Our mission is to enrich lives and strengthen communities.* _______________________________________________ Evergreen-dev mailing list -- evergreen-dev@list.evergreen-ils.org To unsubscribe send an email to evergreen-dev-leave@list.evergreen-ils.org
_______________________________________________ Evergreen-dev mailing list -- evergreen-dev@list.evergreen-ils.org To unsubscribe send an email to evergreen-dev-leave@list.evergreen-ils.org
-- Galen Charlton Implementation and IT Manager Equinox Open Library Initiative gmc@equinoxOLI.org https://www.equinoxOLI.org phone: 877-OPEN-ILS (673-6457) direct: 770-709-5581 <http://evergreen-ils.org>

Hi, On Fri, Jun 13, 2025 at 3:29 PM Josh Stompro via Evergreen-dev < evergreen-dev@list.evergreen-ils.org> wrote:
Is my understanding correct? Does it make sense to remove that CQL example?
It probably does, since most Z39.50 clients will just send RPN queries anyway, but you could make the example work by doing the following: [1] Create a CQL mapping file something like this set.cql = http://www.loc.gov/zing/cql/context-sets/cql/v1.1/ set.dc = http://www.loc.gov/zing/cql/dc-indexes/v1.0/ index.cql.serverChoice = 1=1016 index.dc.title = 1=4 index.dc.author = 1=1003 index.dc.subject = 1=21 relation.< = 2=1 relation.eq = 2=3 relation.scr = 2=3 position.any = 3=3 6=1 structure.* = 4=1 (This was adapted from example 7.10 of https://software.indexdata.com/yaz/doc/yaz.pdf) [2] Run yaz-cilent like this: yaz-client localhost:9999/CONS -q cql_mapping_file Z> querytype cql2rpn Z> find dc.title="throne of the crescent moon" and dc.author="ahmed" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 1, setno 1 records returned: 0 Elapsed: 0.084814 Regards, Galen -- Galen Charlton Implementation and IT Manager Equinox Open Library Initiative gmc@equinoxOLI.org https://www.equinoxOLI.org phone: 877-OPEN-ILS (673-6457) direct: 770-709-5581 <http://evergreen-ils.org>

Thank you Galen, I appreciate you taking the time to look into this. I'll update the wiki page and add a new example showing how to setup CQL searching. Josh On Fri, Jun 13, 2025 at 4:50 PM Galen Charlton <gmc@equinoxoli.org> wrote:
Hi,
On Fri, Jun 13, 2025 at 3:29 PM Josh Stompro via Evergreen-dev < evergreen-dev@list.evergreen-ils.org> wrote:
Is my understanding correct? Does it make sense to remove that CQL example?
It probably does, since most Z39.50 clients will just send RPN queries anyway, but you could make the example work by doing the following:
[1] Create a CQL mapping file something like this
set.cql = http://www.loc.gov/zing/cql/context-sets/cql/v1.1/ set.dc = http://www.loc.gov/zing/cql/dc-indexes/v1.0/ index.cql.serverChoice = 1=1016 index.dc.title = 1=4 index.dc.author = 1=1003 index.dc.subject = 1=21 relation.< = 2=1 relation.eq = 2=3 relation.scr = 2=3 position.any = 3=3 6=1 structure.* = 4=1
(This was adapted from example 7.10 of https://software.indexdata.com/yaz/doc/yaz.pdf)
[2] Run yaz-cilent like this:
yaz-client localhost:9999/CONS -q cql_mapping_file Z> querytype cql2rpn Z> find dc.title="throne of the crescent moon" and dc.author="ahmed" Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 1, setno 1 records returned: 0 Elapsed: 0.084814
Regards,
Galen -- Galen Charlton Implementation and IT Manager Equinox Open Library Initiative gmc@equinoxOLI.org https://www.equinoxOLI.org phone: 877-OPEN-ILS (673-6457) direct: 770-709-5581 <http://evergreen-ils.org>
participants (3)
-
Galen Charlton
-
JonGeorg SageLibrary
-
Josh Stompro