MySQL Forums
Forum List  »  Full-Text Search

Exclude expression not working on fulltext fields
Posted by: Arthur Radulescu
Date: December 16, 2010 10:25AM

Hi,

I have a weird situation (in my opinion) where a MATCH query is working fine on a field that does not have a fulltext index but is not working on a field with full text index

Here is the query

1. SELECT * FROM table WHERE
MATCH(field_no_fulltext) AGAINST ('+keywords1 +keyword2 -"keyword4 keyword3"' IN BOOLEAN MODE)

2. SELECT * FROM table WHERE
MATCH(field_with_fulltext) AGAINST ('+keywords1 +keyword2 -"keyword4 keyword3"' IN BOOLEAN MODE)

The record "keywords1 keyword2 keyword3 keyword4" is not found when searching the fulltext indexed field (case #2) but it is found in the other case (case #1). There are no excluded words and the indexing length is starting at 1 character (I tried the same thing on multiple)

ft_min_word_len = 1
ft_stopword_file =

I simply do not understand why using this -"keyword4 keyword3" is transforming into something like this -keyword4 -keyword3 for the full text field. While for the + operator it works fine so something like +"keywords2 keyword1" will not found the record if it does not match as it should.

Can anyone give me an ideea of what I am doing wrong or how to solve this situation. I need to exclude expressions and this seems the only way of doing this (except for breaking this into 2 parts with MATCH(..) AND NO MATCH(...))


Arthur

Options: ReplyQuote


Subject
Views
Written By
Posted
Exclude expression not working on fulltext fields
3847
December 16, 2010 10:25AM


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.