MySQL Forums
Forum List  »  Full-Text Search

Logical OR and fulltext search
Posted by: Andreas Renner
Date: March 05, 2013 05:15AM

Hello,

I've searched alot now but couldn't find any answer to my problem, which is:

I'm trying to do a boolean search to find all rows where one or multiple columns match at least one of the tokens of my search string, for example, I thought this:

'(+apple +imac) (+apple +iphone) (+apple +ipod)'

is equivalent to

apple AND imac
OR
apple AND iphone
OR
apple AND ipod

but this doesn't seem to be the case. If I execute the query:

SELECT * FROM Article where MATCH(title, subtitle, abstract, abstract_short, text) AGAINST ('(+apple +imac) (+apple +iphone) (+apple +ipod)' IN BOOLEAN MODE) > 0;

the result is the same as for:

SELECT * FROM Article where MATCH(title, subtitle, abstract, abstract_short, text) AGAINST ('+apple +imac +apple +iphone +apple +ipod' IN BOOLEAN MODE) > 0;

So all I get is the result for the CONJUNCTION of the tokens, not for the desired DISJUNCTION, which I thought to get if I group the search terms by parentheses.

Can anybody explain to me how I can reach a disjunction of the tokens?

Thanks in advance

Options: ReplyQuote


Subject
Views
Written By
Posted
Logical OR and fulltext search
4442
March 05, 2013 05:15AM
2379
March 08, 2013 12:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.