CQL in SRW

Version 1.1, 12th January 2004

Introduction

SRW uses the CQL query language for all of its search and browse requests. CQL was designed in conjunction with SRW, but is also used in other environments such as Z39.50. CQL queries are human readable and human writable, with the intent that the language should be both intuitive and expressive at the same time.

The CQL definition documentation is also maintained at the Library of Congress.

CQL in SRW

CQL is used in both the searchRetrieve and scan operations within SRW. In searchRetrieve, it is sent in the 'query' parameter, which may include any legal CQL. On the other hand, the 'scanClause' parameter in scan may only contain a single CQL searchClause, made up of index, relation (plus optional modifiers) and term. Both of these parameters are mandatory, and as such CQL forms a solid foundation on which to build the SRW protocol.

The version of CQL used in a request is tied directly to the SRW version used, as stated in the version parameter. This is the only version of CQL that will ever be used with the particular version of SRW. For version 1.1 of SRW, the CQL used is also version 1.1. The version numbers will likely not be the same for future versions as the two parts grow independently. Minor versions of SRW may be released only to increment the version of CQL used, if there is a good reason to do so.