Print

Print


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