Re: sru and query

> Date: Wed, 15 Feb 2006 08:55:39 -0800 (PST)
> From: David Loy <de_loy@yahoo.com>
>
> Is there any mechanism in sru (not srw) that allows
> alternate query types to be used (e.g. Google, etc.)
> instead of cql?

Hi, David.  As Ray points out, it would be possible to use a profiled
SRU/W extension to do this.  But it's strongly discouraged, because
one of the great strengths of SRU is precisely that it has just one
query language.  Although it makes initial implementation a little
trickier(*), the result is that any query can be sent to any SRU
implementation, and that is a very big win especially for
metasearchers.

(*) I say "a little trickier" because, as you may know, there are
excellent free CQL parsers available, which you're welcome to use in
your project.  See
	http://zing.z3950.org/cql/
which links to parsers for Java, Python, C/C++, Perl and PHP.

... as it happens, I literally yesterday wrote a new section in the
manual for Index Data's SRU-compatible database engine, Zebra, which
says:

	NOTE: It is possible to cheat, by having SRU or SRW
	search Zebra with a PQF query instead of CQL, using
	the "x-pquery" parameter instead of "query".  This is
	a NON-STANDARD EXTENSION of CQL, and a VERY NAUGHTY
	thing to do.

So I am not proud of this.  We use it only as a debugging aid.

 _/|_	 ___________________________________________________________________
/o ) \/  Mike Taylor  <mike@miketaylor.org.uk>  http://www.miketaylor.org.uk
)_v__/\  Why do people say that Oasis are the New Beatles, but not that
	 the Beatles are the Old Oasis?

Received on Thursday, 16 February 2006 09:38:19 UTC