> Date: Tue, 14 Dec 2004 22:58:58 +0000
> From: Dr Robert Sanderson <[log in to unmask]>
>
> >> - The meta-index cql.anywhere searches all indexes defined in the
> >> Adlib database at once. It does not search all indexes in all
> >> context sets, as the CQL context set suggests. This might be a slow
> >> search if there are a lot of indexes.
> >
> > It is at best inadvisable, and probably just wrong, to _re_define the
> > meaning of an existing index like this -- especially such a core one.
>
> I think that's exactly what cql.anywhere means. Search all indexes that
> you know about, but you can't be expected to search indexes that you don't
> know about.
>
> Which is (thankfully, for once) exactly how it's defined:
>
> This means "search all indexes from all context sets you know".
Well, I will leave it to the profile author to say whether that was
what he meant. I read the Adlib-specific definition to mean that they
wanted "anywhere" to mean "in any of the Adlib access points only".
> >> - The adlib.record meta-index searches the whole record. The
> >> operator doesn't matter. This is a slow search since no index can
> >> be used.
> >
> > Perhaps we should consider adding cql.record for whole-record
> > searching (where supported).
>
> I'm not sure what exactly happens here. Is it:
>
> (a) You send some terms and it searches the entire record. (And how is
> this different to cql.anywhere in practice?)
>
> (b) You send the entire record as a term, and it returns the entire
> record back to you if it finds it. (seems ... odd)
The former. No-one wants (b).
For Adlib, there _is_ an implementation difference between (the
putative) cql.record access point on cql.anywhere. in that the latter
makes use of all the indexes that are to hand, but the former makes a
physical scan of all records, so it can even find the term in fields
that are not indexed. As I implied, not every server will implement
this (which is fine) but it does seem like a useful distinction for
those that do.
> >> - The 'encloses' and 'within' operators are implemented using the
> >> Adlib WHEN operator. Some examples:
> >> 'term encloses "2000 2004"' translates to 'term >= 2000 WHEN term
> >> <= 2004'
> >> 'term within "2001 2005"' translates to 'term > 2001 WHEN term <
> >> 2005'.
>
> Wait wait...
> Here are some uses for within and enclose:
>
> dc.date within "2000 2004"
> -> Does the record contain a date between (inclusive) 2000 and 2004
>
> foo.rangeOfDates encloses 2002
> -> Does 2002 fall within (inclusive) the date range in the record.
>
> For example:
> <record>
> <date>2002</date>
> </record>
>
> would match the within query.
>
> and
>
> <record>
> <dateRange>2000 2004</dateRange>
> </record>
>
> would match the encloses query.
Isn't this what I said?
> > No, we all agreed that "exact" does _not_ imply unmasked.
>
> But it does imply anchored.
Well, yeah -- if you want to think of it in those terms. I think it's
more helpful to think that when you're doing an "exact" search
(i.e. with term-structure "string") the notion of anchoring, which is
to do with the position of _words_ within the string, is inapplicable.
> >> + operator '=': implied modifiers are cql.masked and either cql.word
> >> or cql.string, depending on the index type. This cannot be seen
> >> in the explain information but must be described in a profile.
> >
> > This is _not_ what "=" means in CQL. It means that the term is
> > word-structured, irrespective of the index being searched, unless
> > overridden by a relation modifier.
>
> I disagree, Mike. It means, currently, exact equality, but does not
> say how equality is to be determined.
Au contraire. This is precisely the difference between "=" and
"exact".
> >> + adlib.record meta-index: implied operators are cql.string and
> >> cql.unmasked.
> > There is nothing in CQL that allows you to infer different
> > term-structure and masking semantics from an index name.
>
> So you have to treat dc.date = "2004-12-25" as a word? or a string?
> Sure you can do this.
Hmm. Your example is strangely provoking.
I must retreat to my cave and meditate.
_/|_ _______________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ "Do you really want to go work for the Evil Empire?
People are embarrassed to say they work for Microsoft now"
-- Michael S. Malone, editor-in-chief of Forbes ASAP.
--
Listen to free demos of soundtrack music for film, TV and radio
http://www.pipedreaming.org.uk/soundtrack/
|