I have very big data in on table (more then 4lc rows). Right now i am using mysql full text search but its very slow.
I google and found many blog which suggest to use elastic search for searching. We are testing if elastic search will help in fast search.
but we are getting opposite result(mysql better search), but i doubt if i have used elastic search in correct way. Elastic search query i used is:-
{
"query" : {
"bool" : {
"must" : {
"query_string" : {
"query" : "goog*",
"default_field" : "search"
}
}
}
},
"size" : 1000
}
For same search in mysql we used
SELECT SQL_NO_CACHE * FROM table1 WHERE (MATCH (search) AGAINST (' +goog' IN BOOLEAN MODE))*
I get time diff:- elastic time = 0.34929585456848
mysql time = 0.02162504196167
Any suggestion where i am wrong I will very much appreciate