This makes some amount of sense, thanks.
I actually kind of liked the sorting as part of CQL in SRU 1.2. I see
how XPath sorting can be convenient too.
But you will leave sorting as part of CQL too in any changes to CQL
specs, I hope? I think CQL has a lot of use even outside of SRU proper,
so I encourage you to leave it's spec not too tightly coupled to SRU.
I think there are at least three ways to sort as part of (different
versions of?) SRU now!
1) An actual separate "&sortKeys" query paramater
2) Included in the CQL expression in "&query", using the "sortBy" keyword.
3) In draft not finalized, OASIS/SRU 2.0 methods of specifying XPaths
for sorting. [Thanks for including the link to the current SRU 2.0
draft, I didn't know that was publically available anywhere, it's not
really googlable].
Do I have this right? As SRU 1.2 is the only actual spec I have to work
with... am I right that either top-level "&sortKeys", or embedded in CQL
with "sortBy" would both be legal in SRU 1.2 (whether a given server
supports one or both of them is a different question -- but they are
both legal to spec, yes?).
I'd actually strongly encourage you to leave both of them as legal to
spec in SRU 2.0, they make things much simpler to work with (although
also less flexible; that's generally the trade-off) then requiring
XPath's to be specified. Especially when a corpus being searched may
include records in diverse and varied and inconsistent record schemas.
Jonathan
Ray Denenberg, Library of Congress wrote:
> From: "Jonathan Rochkind" <[log in to unmask]>
>
>> Another question though. I note when looking up schemaInfo... I'm a bit
>> confused by the "sort" attribute. How could you sort by a schema? What is
>> this attribute actually for?
>>
>
>
> Well indulge me, this is best explained by the current OASIS SRU draft.
>
> (The current and earlier specs don't do a good job here. But for background
> if interested: sorting as an SRU function was supported in SRU 1.1 and
> taken out of version 1.2, replaced by sorting as a function of the query
> language rather than the protocol. For the OASIS work it's in both. For the
> current spec at LC, which reflects 1.2, the attribute doesn't even make
> sense. If you go back to the 1.1 archive it does. Still, the OASIS document
> treats it more clearly.)
>
> See http://www.loc.gov/standards/sru/oasis/sru-2-0-draft-most-current.doc
> See section 9.1.
>
> So essentially, when you sort in SRU, you provide an XPath expression. The
> XPath expression is meaningful in the context of a schema, but the *record
> schema* may not be the most meaningful schema for purposes of sorting, there
> may be another schema more meaningful. So, you have the capability to
> specify not only a record schema but an auxiliary sort schema.
>
> A given schema that an Explain file lists will usually be one that is used
> as a record schema, but it may also be usable as a sort schema. That's
> what the sort attribute tells you.
>
> --Ray
>
>
|