OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: search machine problems

From: Aleksandra (ngroupsfastmail.fm)
Date: Thu Oct 27 2005 - 06:40:28 CDT


Jigal van Hemert wrote:

> Aleksandra wrote:
>
>> I've written a search machine. It's working quite well, but I have
>> two problems:
>>
>> 1. When I give the following syntax : cat and dog , as a result I
>> get everything with at least one of the words: 'cat', 'dog' but also
>> 'and'.
>> What can I do, so that it's not looking for the word 'and' or some
>> other similar words like 'or', etc..
>>
>> 2. I would like the search machine to look for the results that
>> consist both: 'cat' and 'dog' and not only one of this words.
>
>
> I assume that you use Full-Text searches (but somehow you have managed
> to change the default minimum word length to three).
> Maybe you can find the functionality you want in Boolean Full-Text
> searches (http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html).
>
> Changing 'cat and dog' to '+cat +dog' is a matter of parsing the input
> in your application. You have to be beware of expressions such as 'cat
> "dog and man" +bird' where your "noise words" are suddenly relevant
> when inside double quotes.

As far as I understand what you've written - if I change the minimum
word length to 4, I won't get any result with the word 'and', but what's
more - I won't get any result, because all the words I've used are not
longer than 3 letters. Another thing ist that there are many short words
that make sense, so it won't solve my problems.

Any more ideas?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql