[Koha-zebra] CQL queries into MARC records (Was: .abs file and subfield ordering)

Sebastian Hammer quinn at indexdata.com
Wed Feb 15 18:42:24 CET 2006


Hi Paul,

I've developed a lot of systems for both end-users and professionals 
over the years. Unlike Mike, I don't believe there are really any 
circumstances where you'll want to let end-users loose with CQL, anymore 
than you do with SQL (let the query language flame wars begin).

If I were building a query interface for Koha for either type of users, 
I would use YAZ's CCL parser as the starting point. It is flexible 
enough to provide a basic query language that feels to most users like 
the google one, but it also is a naturally comfortable way for 
professionals to express arbitrarily complex queries. I'm *assuming* 
that Mike's API exposes YAZ's client-side support for CCL? Ortherwise, 
it should.

(CCL is an ISO/NISO standard which hasn't received much attention after 
the advent of forms-based web interfaces, but it's still a language that 
comes very naturally to most librarians).

Configuration info at http://www.indexdata.dk/yaz/doc/tools.tkl#CCL

For the default search, I typically use an 's=al' if I'm searching 
arbitrary targets.. this turns a list of words into an and-list, which 
typically provides similar responses to what the user expects.. it can 
be overriden by the use of "", in the way you'd expect. You specify 
preconfigured fields using field=someterm, similar to CQL. But I believe 
the vast majority of librarians (at least the ones I've met) would be 
happier FOR MOST PURPOSES with a comprehensive list of mnemonic index 
names than an ability to address MARC fields directly. Most librarians 
like MARC, but they're not fanatics.

The CCL parrser of course also supports truncation, paranthesises, and 
the use of boolean operators, all of which are configurable to allow for 
different languages (well, except the paranthesises). Even better, if 
you decide you'd like to search different targets at the same time as 
you search your local server, it is an easy matter to provide different 
configurations for each target to allow for different USE attribute 
mappings, search capabilities. In fact, the YAZ CCL parser is at the 
heart of every single metasearch solution we have deployed in the past 
8-9 years or so, and it's proven really excellent for the job of 
tayloring queries to different, more or less cooperative targets.

There's presently no obvious way of directing searches directly at named 
subfields in CCL.

--Sebastian





More information about the Koha-zebra mailing list