mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
parser bug of "phrase search" fixed
This commit is contained in:
@ -125,7 +125,7 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
|
|||||||
byte *doc=*start;
|
byte *doc=*start;
|
||||||
int mwc;
|
int mwc;
|
||||||
|
|
||||||
param->yesno=(FTB_YES==' ')?1:0;
|
param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0);
|
||||||
param->plusminus=param->pmsign=0;
|
param->plusminus=param->pmsign=0;
|
||||||
|
|
||||||
while (doc<end)
|
while (doc<end)
|
||||||
@ -156,7 +156,7 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
|
|||||||
if (*doc == FTB_NEG ) { param->pmsign=!param->pmsign; continue; }
|
if (*doc == FTB_NEG ) { param->pmsign=!param->pmsign; continue; }
|
||||||
}
|
}
|
||||||
param->prev=*doc;
|
param->prev=*doc;
|
||||||
param->yesno=(param->quot != 0);
|
param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0);
|
||||||
param->plusminus=param->pmsign=0;
|
param->plusminus=param->pmsign=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ Full-text search in MySQL implements vector space model 0
|
|||||||
select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
|
||||||
a b
|
a b
|
||||||
Full-text indexes are called collections
|
Full-text indexes are called collections
|
||||||
|
select * from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE);
|
||||||
|
a b
|
||||||
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
|
||||||
a b
|
a b
|
||||||
MySQL has now support for full-text search
|
MySQL has now support for full-text search
|
||||||
|
@ -35,6 +35,7 @@ select *, MATCH(a,b) AGAINST("collections support" IN BOOLEAN MODE) as x from t1
|
|||||||
|
|
||||||
select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
|
||||||
|
|
||||||
|
select * from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE);
|
||||||
|
Reference in New Issue
Block a user