L******r 发帖数: 199 | 1 there is a sentence "┬╗ Site Searches and Difficult " in a text field, but
when I use full-text search to search, it cant return the right result. why?
mysql> SELECT id,data FROM reviews WHERE MATCH (data) AGAINST ('difficult')&
& ma
tch(data) against ('and');
Empty set (0.00 sec)
mysql> SELECT id,data FROM reviews WHERE MATCH (data) AGAINST ('Difficult ')
&& m
atch(data) against ('and');
Empty set (0.00 sec)
mysql> SELECT id,data FROM reviews WHERE id=5039010;
+---------+----------------------- | y****r 发帖数: 17 | 2 is your table MYISAM?
why you put whitespace after Difficult in your 2nd query?
but
why?
)&
')
【在 L******r 的大作中提到】 : there is a sentence "┬╗ Site Searches and Difficult " in a text field, but : when I use full-text search to search, it cant return the right result. why? : mysql> SELECT id,data FROM reviews WHERE MATCH (data) AGAINST ('difficult')& : & ma : tch(data) against ('and'); : Empty set (0.00 sec) : mysql> SELECT id,data FROM reviews WHERE MATCH (data) AGAINST ('Difficult ') : && m : atch(data) against ('and'); : Empty set (0.00 sec)
| L******r 发帖数: 199 | 3 how do I know if the table is myisam?
difficult'
Difficult
【在 y****r 的大作中提到】 : is your table MYISAM? : why you put whitespace after Difficult in your 2nd query? : : but : why? : )& : ')
| L******r 发帖数: 199 | 4 well.
I used
select * from reviews where ((data like '% and$%')||(data like '% and %')||(
data like '%^and %')) && ((data like '% difficult%$')||(data like '%
difficult %')||(data like '%^difficult %'));
seems OK, right?
difficult'
Difficult
【在 y****r 的大作中提到】 : is your table MYISAM? : why you put whitespace after Difficult in your 2nd query? : : but : why? : )& : ')
|
|