I'm somewhat relieved to see that Theo, like me, did not easily find the
encoding for sort in a URL. It's on the sort page at:
http://www.loc.gov/z3950/agency/zing/srw/sort.html . Under sort keys, the
rules are clear, but there is only an SRW example. I do think that it would
help to add an SRU example here, so here is one:
..... &sortKeys=title,onix&sortKeys=date,onix,0
OR as per Theo's request:
..... &sortKeys=title,onix;date,onix,0
This asks to sort primarily by title (ascending) from the onix schema then
by date (descending), also from the Onix schema. caseSensitive is not given,
therefore insensitive is the default which applies. Similarly missingValue
is not given, therefore the default highValue applies.
Note too that the grammar in the following sentence should be fixed from:
"The path and schema must be quoted if the contain quotes, commas or
spaces."
"The path and schema must be quoted if they contain quotes, commas or
spaces."
Janifer
-----Original Message-----
From: Theo van Veen [mailto:[log in to unmask]]
Sent: 16 April 2004 09:45
To: [log in to unmask]
Subject: Betr.: Re: More about sort in the URL
Larry,
If you are looking for examples: we use sortKeys=<tag path>,[a|d] like
for example "sortKeys=title,d,author,a".
As it is not yet specified for 1.1 (or is it by the examples?) I would
like to suggest a change the syntax for SRU so that different sort
strings are in a single URL parameter separated by ";" like for
example:
sortKeys=dc.title,a;dc.creator,d,0,h,mods
It is only a minor thing but just easier to read, type and parse
without counting comma's and without keeping the order of url
parameters.
Theo
>>> [log in to unmask] 15-4-04 16:20:54 >>>
Janifer,
Always looking for SRU examples, I added your two sortKey requests to
http://lcweb.loc.gov/z3950/srutest.html
Let me know if they need to be changed (following this discussion).
Larry
On Thu, 15 Apr 2004, Janifer Gatenby wrote:
> The following two URLs show sort working but the sequence of the
"sort comma
> delimited elements" is different from the document that I found and
gave in
> the previous message. This leads me to believe that there was a
later
> version 1.0 document. I would naturally prefer the sequence that we
have
> implemented which is below but don't mind too much:
>
> tag path, schema, case, missing value, direction
>
>
> http://greta.pica.nl:1080/sru/?operation=searchRetrieve
>
<http://greta.pica.nl:1080/sru/?operation=searchRetrieve&version=1.1&query=d
>
c.title%20exact%20html&recordSchema=dc&sortKeys=RLV,pica,1&maximumRecords=10
> &recordPacking=xml>
>
&version=1.1&query=dc.title%20exact%20html&recordSchema=dc&sortKeys=RLV,pica
> ,1&maximumRecords=10&recordPacking=xml
>
> http://greta.pica.nl:1080/sru/?operation=searchRetrieve
>
<http://greta.pica.nl:1080/sru/?operation=searchRetrieve&version=1.1&query=d
>
c.title%20exact%20html&recordSchema=dc&sortKeys=YOP,pica,1&maximumRecords=10
> &recordPacking=xml>
>
&version=1.1&query=dc.title%20exact%20html&recordSchema=dc&sortKeys=YOP,pica
> ,1&maximumRecords=10&recordPacking=xml
>
>
> Janifer
>
> Janifer Gatenby
> New Business Development Manager OCLC PICA
> Schipholweg 99 2300 AW Leiden, The Netherlands
> + 31 71 524 65 00
> + 31 71 522 31 19 (fax)
> [log in to unmask]
>
>
>
>
|