diff options
author | unknown <serg@serg.mylan> | 2004-02-22 00:19:36 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-02-22 00:19:36 +0100 |
commit | 7759360dca5e4536eb41cb585334c9e088378d80 (patch) | |
tree | 6af551cd9d854a00ac2a43c87e0b015dc1db230f /myisam/ft_boolean_search.c | |
parent | ecf6eeca6069ea85cc99fa6d381fb6d4a53977d2 (diff) | |
download | mariadb-git-7759360dca5e4536eb41cb585334c9e088378d80.tar.gz |
ftb +(+(many -parens)) bug fixed
Diffstat (limited to 'myisam/ft_boolean_search.c')
-rw-r--r-- | myisam/ft_boolean_search.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index c7128464228..799022a5a0d 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -55,8 +55,9 @@ static double _nwghts[11]= static double *nwghts=_nwghts+5; /* nwghts[i] = -0.5*1.5**i */ #define FTB_FLAG_TRUNC 1 /* MUST be 1 */ -#define FTB_FLAG_YES 2 /* These two - YES and NO */ -#define FTB_FLAG_NO 4 /* should NEVER be set both */ +#define FTB_FLAG_YES 2 /* no two from these three */ +#define FTB_FLAG_NO 4 /* YES, NO, WONLY */ +#define FTB_FLAG_WONLY 8 /* should be ever set both */ typedef struct st_ftb_expr FTB_EXPR; struct st_ftb_expr @@ -444,7 +445,8 @@ static void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_ ftbe->cur_weight += weight; if (ftbe->yesses < ythresh) break; - yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ; + if (!(yn & FTB_FLAG_WONLY)) + yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : FTB_FLAG_WONLY ; weight*= ftbe->weight; } } |