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.
Regards, Jigal.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]