Skip to content

API method for passing CQLqueries to DNB-SRU service with the new API

For the old API there are advanced queries described which pass mor CQL to a query. https://wiki.de.dariah.eu/display/publicde/DARIAH-DE+Normdatendienste#DARIAH-DENormdatendienste-AdvancedUsage(passingSRUparameters)

This is still possibe with the new API, e.g:

http://localhost:8080/exist/restxq/gnd/v1/starts-with?q=W%C3%B6hler%20and%20dnb.sw=Soziologe%20and%20dnb.geo=Heidelberg http://localhost:8080/exist/restxq/gnd/v1/exact-match?q=W%C3%B6hler%20and%20dnb.sw=Soziologe%20and%20dnb.geo=Heidelberg

but the exact-match and starts-with methods do modify the query:

exact-match:

    let $cql := "dnb.per%3D" || encode-for-uri($ln) || "%20and%20BBG%3DTp*"

starts-with:

    let $cql := "dnb.per%3D" || encode-for-uri($ln) || "*%20and%20BBG%3DTp*"

so starts-with query simply has a * added to the q. in the example above this would mean we search for dnb.geo=Heidelberg* instead of dnb.per=Wöhler*

so for the advanced usage pattern we could just add a api method /cql/ where the q gets passed as it comes in, and you would need to add dnb.per= yourself if needed.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information