MySQL Forums
Forum List  »  Full-Text Search

FTS with range component
Posted by: Adam Thody
Date: February 04, 2008 02:14PM

I need to search a table by its fulltext index, but there is also a date range element. The query I've composed isn't yielding the results I would expect

The query is as follows:

SELECT id, title
FROM mytable
WHERE MATCH(title,body) AGAINST ('mongolia' IN BOOLEAN MODE)
AND `added_date` BETWEEN '2008-01-01' AND '2008-02-28';

There is a fulltext index on title,body and an index on added_date.

The query should yield 2 matching records, but it returns none. No errors.

Explain yields ('search' is the fulltext index):

*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: mytable
type: fulltext
possible_keys: added_date,search
key: search
key_len: 0
ref:
rows: 1
Extra: Using where


Any ideas?

Options: ReplyQuote


Subject
Views
Written By
Posted
FTS with range component
4625
February 04, 2008 02:14PM


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.