Dear All,
I'm using MySQL FullText index for field which holds the large text. I tried the like query to search in this field and also used like conditions to test which is faster. Is the FullText Search better than like conditions or have their own benefits?
Regards,
Dibyendra
MySQL FullText Search
Moderator: General Moderators
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
Much different than the 'like' operator full text searches are. Return a very different set of results for very different search criteria full text searches will.
ex:
with like:
'....where field like '%I am Yoda%''
return any string that contains 'I am Yoda' this will... return any string that contains 'I am neat and my name is Yoda' this will not.
with fti:
'....where match ('I am Yoda') against....'
return any string that contains 'I am Yoda' this will... return any string that contains 'I am neat and my name is Yoda' this might.
see the differenece?
ex:
with like:
'....where field like '%I am Yoda%''
return any string that contains 'I am Yoda' this will... return any string that contains 'I am neat and my name is Yoda' this will not.
with fti:
'....where match ('I am Yoda') against....'
return any string that contains 'I am Yoda' this will... return any string that contains 'I am neat and my name is Yoda' this might.
see the differenece?
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
got some clue about full text search and implementing
Hi Burrito,
I got some clue about full text in mysql from you and thanks for that. Anyway, I'll be back after having the detail look at manaul.
Dibyendra
I got some clue about full text in mysql from you and thanks for that. Anyway, I'll be back after having the detail look at manaul.
Dibyendra
If you got 1 table row with one large text the full text search will never get you anything. Only if you got many rows in the table you will get a result.
This is due to the fact that if mysql returns more than 50% of the rows in the search it renders it trivial. With one row you always get a trivial result.
This is due to the fact that if mysql returns more than 50% of the rows in the search it renders it trivial. With one row you always get a trivial result.