On Thu, May 16, 2002 at 03:46:40PM +0100, Mike Taylor wrote:
> Suppose you're writing a server. A client sends a search against a
> CQL prefix "title". Now your back-end configuration doesn't know
> anything about that prefix. All it knows about is "bib.title" and
> "heraldry.title". So what does it do? Well, it could just fault the
> search: that's perfectly legitimate but doesn't strike me as very
> helpful. If you want to make life nice for the poor user (or the poor
> multi-casting search gateway) you'll guess that it probably meant
> bib.title and go ahead on that basis.
This makes me a little uncomfortable. I would rather a database designer
decide in advance that "title" is the same as "dc.title" (and so define
both index names). I dislike fuzzy semantics of "well, I did not describe
"title" via explain, but you can query on it anyway." Either that or
it needs to be thrashed out and a good formal semantic model worked out.
I would rather just get the database designer to take such issues into
account when they design the database.
> My suggestion is simply this: that we gently encourage servers which
> want to be useful to do so by using DC-like semantics for unqualifed
> prefixes that it doesn't have its own meaning for.
My suggestion is mildy differnt. I suggest allowing a server to
publicise the index names it supports via Explain. Names can have
prefixes, but can also omit them.
Groups can then, outside the CQL standard, define profiles where each
profile "claims" a prefix. Databases can then be designed to be
conformant to a profile.
But a database designer is free to implement whatever they want.
They can define their own set of names like "title" etc. They can
define support for standard prefixes (like "dc.title"). The standard
does not recommend one over the other - it only explains that
prefixes are intended to be used with standard sets of index names
with published meaning, where those meanings are outside the CQL spec.
With this semantics, then all you need to do is say "index names can
have a '.' in them" and "it is a common practice to use a prefix such
as 'dc' as in 'dc.title' for use in CQL profiles." Prefixes then have
zero special semantics in CQL - its conventions on how people use names
with '.' in them that is the only special part. The result is nice
simple, clean, semantics. You can query on names that are listed in
the Explain record.
Alan
ps: If a index name is not defined, the behaviour to use (error,
server default, etc) to me is a separate issue.
|