I am a bit new to MySQL Full Text Search capability.
I would like to clarify some usage of MATCH()..AGAINST() FTS functionality.
If we have a column of type text and which contains multiple name pair values along with other text. Generally I understand that the FTS feature in MySQL can be used as via below command:
select col from mytable where match(text_data) against('some word') limit 10;
But I need to search for multiple words like, if:
select text_data from mytable;
==============================
abcd, xyax&iopp data=1244 amt=78 ..
abcd, xyax&iopp data=12xx amt=7x ..
Now I want to search in text_data column having value data value as ‘1244’ and amt as ’78’. So how can I use two expression is AGAINST clause:
select col from mytable where match(text_data) against ('data=1244' and 'amt=78')
OR
select col from mytable where match(text_data) against ('data=1244') and match(text_data) against ('amt=78')
OR
select col from mytable where match(text_data) against ('data 1244 amt 78')
OR
is there any other way?
Note that you should have
ft_min_word_lenset to 1 for this to work (with default value of 4,amtand78won’t even get indexed)