Hi!

On Nov 26, Mike Wexler wrote:
> Sergei Golubchik wrote:
> > Hi!
> > 
> > I didn't test it yet.
> > 
> > The one thing I can say just now that unlike natural language search
> > code (as exists in MySQL in 3.23) it need not to build the complete list
> > of matched documents in memory in advance. It means that with LIMIT it
> > should be MUCH faster than the old code.  Unfortunately, it also means
> > that it does not "auto-magically" return documents with relevance
> > decreased (without ORDER BY, that is).
> 
> If I use ORDER BY relevance and LIMIT. Does it need to build the 
> complete list of documents in memory in advance? Or will it just build 
> enough to satisfy the limit constraints.

It will "build enough to satisfy the limit constraints", but
with ORDER BY this "enough" is the complete list. If you want
to get five rows with highest relevances MySQL will retrieve all the
matching rows, sort them with relevance decreasing, and then return
top five rows. But it should not be a big deal as for boolean searches
there's no meaningful "relevance" anyway. It's boolean - true or false.
Some floating point "relevance" is introduced to give a rough estimation
of the number of words matched, but, in fact, all the rows in the result
set are equally relevant to the query with relevance value TRUE.

Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to