diff options
author | unknown <serg@serg.mysql.com> | 2001-12-04 14:24:47 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-12-04 14:24:47 +0100 |
commit | 1d55c88e08f7e77093156f82702dce1e79744793 (patch) | |
tree | b361c6db483037085d6a868259f3bc9d97ec9a26 /myisam/ft_boolean_search.c | |
parent | eb4c0fe7800c58a0b88e7f748fd42fdd9111d23b (diff) | |
download | mariadb-git-1d55c88e08f7e77093156f82702dce1e79744793.tar.gz |
ft_boolean_search.c bugfix "+(aaa bbb) +ccc"
ft_dump.c -l option - report word length distribution (for ft_max_word_len_for_sort)
myisam/ft_boolean_search.c:
bugfix "+(aaa bbb) +ccc"
myisam/ft_dump.c:
-l option - report word length distribution (for ft_max_word_len_for_sort)
Diffstat (limited to 'myisam/ft_boolean_search.c')
-rw-r--r-- | myisam/ft_boolean_search.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 0055842c24b..fce6fee7c8d 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -239,10 +239,12 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc) ftbe->cur_weight=ftbe->yesses=ftbe->nos=0; ftbe->docid=curdoc; } + if (ftbe->nos) + break; if (yn>0) { ftbe->cur_weight+=weight; - if (++ftbe->yesses >= ftbe->ythresh && !ftbe->nos) + if (++ftbe->yesses == ftbe->ythresh) { yn=ftbe->yesno; weight=ftbe->cur_weight*ftbe->weight; @@ -265,15 +267,10 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc) /* if (yn==0) */ { ftbe->cur_weight+=weight; - if (ftbe->yesses >= ftbe->ythresh && !ftbe->nos) - { - yn=ftbe->yesno; - weight*=ftbe->weight; - } - else - { + if (ftbe->yesses < ftbe->ythresh) break; - } + yn= (ftbe->yesses++ == ftbe->ythresh) * ftbe->yesno; + weight*=ftbe->weight; } } } |