I have a problem with the MATCH AGAINST query. i am getting 0 result in query when i pass onlu numeric value here is my query :
SELECT * FROM tbl1 WHERE MATCH(
Sub_Name) AGAINST('+praga*' IN BOOLEAN MODE) AND MATCH(
Sub_Address) AGAINST('+203*' IN BOOLEAN MODE)
// result 0 row found
SELECT * FROM tbl1 WHERE MATCH(
Sub_Name) AGAINST('+praga*' IN BOOLEAN MODE) AND MATCH(
Sub_Address) AGAINST('+203 s*' IN BOOLEAN MODE)
// result found
when i use any numeric in (203) then i get 0 result but i use any char with 203 s then result found, and my address field value is "203 surat"
its because wildcard * IN BOOLEAN MODE returns matches that start with the word they are appended to. In your case no word starts with 203 I suppose. Hence you have to specify the word/letter which acts as a starting part of the Match. in your case 'S'
Refer The asterisk serves as the truncation (or wildcard) operator. Unlike the other operators, it should be appended to the word to be affected. Words match if they begin with the word preceding the * operator.