Roger Wallin writes:
> Hi,
> this is probably a newbie-question but we do have difficulties to
> understand the contextsets. Hope you don't mind.
Not at all. All context sets do is provide a context in which to
interpret index names (and relation names, relation modifiers, boolean
modifiers and sort-index modifiers). They are strongly analogous to
XML namespaces, which of course provide a context in which to
interpret XML element names. If you understand that
<a:title xmlns:a="http://example.com/1"/>
and
<a:title xmlns:a="http://example.com/2"/>
are different XML elements, and that
<a:title/>
may be the same as either or different from both depending on its
context, then you'll be fine with CQL context sets.
(At the meeting in the Hauge a couple of years ago, I suggested that
it might be helpful to rename CQL context sets as CQL namespaces. It
didn't get changed, but the analogy is still helpful.)
> <index id="4">
> <title>author</title>
> <map>
> <name>author</name>
> </map>
> <map>
> <name set="dc">creator</name>
> </map>
> </index>
>
>
> If you want to show by the explain that the server accepts indexes without
> a contextset, is it possible to map the index as above, ie. author without
> contextset, allowing queries:
> query=dc.creator="lindgren%"
> query=author="lindgren%"
Yes.
> or should there always be a contextset?
There always is one, but the client doesn't always need to specify it:
the server may have a default context set that it uses when none is
explicitly specified.
_/|_ ___________________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ "Art isn't easy, any way you look at it" -- Steven Sondheim,
"Putting it Together"
|