diff options
author | unknown <serg@serg.mysql.com> | 2002-04-19 13:59:54 +0000 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2002-04-19 13:59:54 +0000 |
commit | 9f00a940211e2845c48ff28dce5ec1ccde15d9f3 (patch) | |
tree | fa09b91f260446c43f9983ee3f48fbbbc60ea1e2 /myisam | |
parent | 0a2319e115e949a202154644bc1c2080675eadc0 (diff) | |
download | mariadb-git-9f00a940211e2845c48ff28dce5ec1ccde15d9f3.tar.gz |
follow-up correction patch for 'boolean fulltext search weighting scheme changed'
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_boolean_search.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 3294965b29c..cd0d0d9d052 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -322,7 +322,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig) break; if (yn & FTB_FLAG_YES) { - ftbe->cur_weight += weight / ftbe->ythresh; + weight /= ftbe->ythresh; + ftbe->cur_weight += weight; if (++ftbe->yesses == ythresh) { yn=ftbe->flags; @@ -360,7 +361,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig) } else { - ftbe->cur_weight += ftbe->ythresh ? weight/3 : weight; + if (ftbe->ythresh) weight/=3; + ftbe->cur_weight += weight; if (ftbe->yesses < ythresh) break; yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ; |