MySQL Forums
Forum List  »  Full-Text Search

Can I use MySQL FTS index to use with 'Like' operator
Posted by: Pratheesh TU
Date: March 03, 2014 11:48PM

I created a table as follows:

create table docdb ( id varchar(50) primary key, path text not null,
PRIMARY KEY (`id`),
FULLTEXT KEY `path` (`path`))


I want to query the 'path' column which have values like: '/opt/home/docs', '/home/var/data', etc...

Can I use MySQL FTS index to use with 'Like' operator.

I want to query - select * from docdb where path like '/home/var%'; I have to use 'path' column as a text, because varchar limit is around 712 chars for indexing. So making FTS index for Like will be a good idea!! Please comment...

Also a normal index on path and FTS index on path has any performance difference with 'Like' operator?

Options: ReplyQuote


Subject
Views
Written By
Posted
Can I use MySQL FTS index to use with 'Like' operator
4045
March 03, 2014 11:48PM


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.