[XESAM] Spec update proposals

Mikkel Kamstrup Erlandsen mikkel.kamstrup at gmail.com
Wed Jun 20 11:39:01 PDT 2007


2007/6/20, Fabrice Colin <fabrice.colin at gmail.com>:
> On 6/20/07, Mikkel Kamstrup Erlandsen <mikkel.kamstrup at gmail.com> wrote:
> >  * Specify that I want to use a signal SearchDone when the index has
> > been searched
> >
> I am not sure I understand. If the search is live, how can it ever be "done" ?
> People may think that once this signal is received, they won't receive any
> more of the Hits signals.

"Done" just mean that the whole index has been searched (and/or that
all external sources has returned on the query). This makes good sense
for live searches too, they just "linger on" after the index has been
searched.

The idea is that a live search consist of two phases, a "scan" and a
"watch" so to say.

> > * Specify that I vote for the <fullTextFields/> element in regExp and
> > proximity selectors to specify searches in the fullText scope. Other
> > selectors can't use this "special field" since it doesn't make sense
> > elsewhere.
> >
> I like alternative 4.1 better. In the user language, a statement without
> a field selection means all fields, so it seems natural to have the same
> in the query language.

Well, as we haven't defined a map user-lang -> query-lang, it is
actually not defined what fields the search "hello world" will search
in. I just translate it to the fullText selector.

Note that the fullText selector is not specified to search in all
fields, nor is it specified how actual matching will be done. I think
this is the right way because it allows for custom hacks an leet
matching algorithms.

Now why am I against having no-fields meaning fullText in the query
language you ask.  First of all it only makes sense on the selectors
'regExp' and 'proximity' (and inSet if you bend the definition a bit
(I wouldn't)).

Basically I just think it fits better into the overall feel of the
language where all things are expressed clearly. If I'm not mistaken
this would be the only place where we infer non-explicit meaning into
the language.

Another point is also that it makes the language more homogenous. You
*always* specify which fields to search in (unless it is the fullText
selector which is kinda special)

> >  * Add a new point "RegExp Not Well Defined", you better go read it!
> >
> Matching on the whole field seems more intuitive to me, but I have had
> bad intuitions in the past ;-)

My gut instainct also said "match entire field", but after some
thought I went for the "match-sub-string". The main reason is that
this is almost always how regular expressions do matching (fx the
expression "le" matches "hello" in grep). Another biggie is that if
you want to do a full test regexp search for all objects matching
"hello|world" you would be forced to enter ".*(hello|world).*" which
seems quite unnatural.

Cheers,
Mikkel


More information about the xdg mailing list