> Date: Thu, 2 Dec 2004 09:23:35 +0100
> From: Hedzer Westra <[log in to unmask]>
>
> Adlib Information Systems, my employer, asked me to implement the
> SRW protocol. I'm about halfway done now, and I've got some remarks
> and questions regarding SRW and CQL, so I thought I'd get a
> subscription to the ZING e-mail list. I'd be really grateful if
> someone could take the time to look at my questions and answer them
> for me.
Welcome aboard!
> - the CQL BNF doesn't mention '/' in the exceptions for charString1
That is a specification bug. Thanks for spotting it. Ray, will you
fix this?
> - I'd like to thank Mike Taylor for creating the SRW-1.1.pdf file
> (at least, I suppose he created it; I e-mailed him some time ago
> with the question whether there was such a document. Now there is!)
I graciously receive your thanks.
But they should really go to Rob Sanderson, who actually did it :-)
> - how are words separated? In the description it hints at splitting
> on (white)space only. Is that true? Adlib has a complex scheme of
> separators and concatenators, is nothing of the kind defined (at
> least for the default context set)?
I think you're talking about the words _within_ a single,
multiple-word, search term, right? A query like:
dc.creator all "kernighan ritchie"
The CQL specification itself says _nothing_ on how such strings as
"kernighan ritchie" above should be broken down into individual
tokens. This is a matter for application profiles.
The way the term should be treated is specified by a "structure
attribute" -- that is, a special relation modifier that, although it
is physically attached to the relation actually talks about the
structure of the term that the relation relates. An example of such a
relation modifier would be cql.isoDate, one of six such modifiers
defined by the CQL content set at
http://www.loc.gov/z3950/agency/zing/cql/context-sets/cql.html
One of these is cql.word, which means:
The term should be broken into words, according to the
server's definition of a 'word'.
The phrasing around these modifiers is a little vague, so it's not
made explicit that this also applies in the case of the default
structure, cql.masked; but I believe that this is what people
intended.
The upshot is that your server is at liberty to break up multi-word
terms however it likes -- including, for example, treating all
whitespace as word-constituent and breaking only no vowels, so that
"kernighan ritchie" is interpreted as "k", "rn", "gh", "n r", "tch".
But obviously the Principle of Least Astonishment suggets that you
shouldn't do that.
For more realistic cases, you should probably use whatever your server
already uses: for example the term "don't" might be interpreted as the
word "don't" (with an embedded apostrophe), as the word "dont"
(without one) or as the sequence of words "don", "t". I don't think
any of these interpretations violate the spirit of CQL.
The important thing, of course, is that you use that same rules to
parse query terms as you did to parse the original document that you
indexed: otherwise you might index the word "don't", and then have the
query "don't" fail because it's interpreted as "dont", which doesn't
appear in the index.
> - is word proximity search required even for basic searches like
> 'author = "Rembrandt van Rijn"' ?
The SRW/U "base profile" at
http://www.loc.gov/z3950/agency/zing/srw/base-profile.html
includes specifications for the minimum level of CQL support:
In order to claim CQL support, at least the following aspects
must be implemented:
* Basic 'contextSet.index relation term' search clauses
* Term only search clauses, quoted and unquoted
* 'and' 'or' and 'not' booleans
* 'any' 'all' and 'exact' relations, = for numeric equality
* Parentheses for determining precedence
So, no, you are not obliged to implement proximity.
[Since CQL has its own existence independent of SRW, I think these
base-profile requirements ought perhaps to be in a separate CQL
base-profile document instead of, or as well as, in the SRW basse
profile.]
> Adlib has no notion of proximity searches, so even the most simple
> type of word search would be quite intricate to program. Compared to
> that, the 'all' and 'any' searches are really simple.
Yes indeed! :-)
I will pass on your XPath-sorting question, and I see that Marc has
already answered your questions about open-source clients.
I will leave Rob to answer the ZeeRex questions; I'm off work today
and tomorrow (not that you'd know it) but when I return next week I'll
integrate Rob's replies into the on-line ZeeRex documentation.
> - the 'gentle CQL introduction' page contains a lot of broken links
> (e.g. in section 4.2). Also, section 4.2 talks about 'srw' which has
> become cql in version 1.1 if I'm not mistaken.
You're right; this tutorial needs a thorough reworking. I wrote it
when SRW 1.0 was current (and hence CQL 1.0). Since that time, CQL
1.1 has come along and a lot of the URLs have changed, as well as some
aspects off the query language itself -- most notably the proximity
syntax. I will re-work this some time, but there's no funding for
this work (unless anyone knows different?) so it will have to wait
until I have no putting-the-bread-on-the-table work to take priority.
> Apart from these questions and remarks I found the documentation
> pretty clear and easy to work with. A bit sketchy sometimes, but
> that's much better than having to crawl through extensively
> technical (e.g. W3C or RFC) documentation!
I emphatically agree! Thanks for your kind words.
_/|_ _______________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ "I wonder just when our thirst for the Premiership got so
unquenchable that we'd even consider employing the likes of
Mr. Bowyer" -- Tony Henshall.
--
Listen to free demos of soundtrack music for film, TV and radio
http://www.pipedreaming.org.uk/soundtrack/
|