1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

boolean fulltext search weighting scheme changed

This commit is contained in:
serg@serg.mysql.com
2002-04-19 13:36:16 +00:00
parent 5f2d79c55a
commit 239f0714a6
4 changed files with 49 additions and 3 deletions

View File

@ -322,7 +322,7 @@ 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->cur_weight += weight / ftbe->ythresh;
if (++ftbe->yesses == ythresh)
{
yn=ftbe->flags;
@ -360,7 +360,7 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
}
else
{
ftbe->cur_weight+=weight;
ftbe->cur_weight += ftbe->ythresh ? weight/3 : weight;
if (ftbe->yesses < ythresh)
break;
yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ;