summaryrefslogtreecommitdiff
path: root/myisam/ft_boolean_search.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2001-12-11 14:40:56 +0100
committerunknown <serg@serg.mysql.com>2001-12-11 14:40:56 +0100
commita3bbc574cf06313d6e362b6b861cf3aab62d5b9e (patch)
treeb5cdf1ea38e8f1be9349c1caffb845b362ab7c83 /myisam/ft_boolean_search.c
parent718825a9b0b9517201b9109c4f88cfaa6b2f20a6 (diff)
parente8b18cc0c5521f0a7fbc5ccb1e470070101ef9b6 (diff)
downloadmariadb-git-a3bbc574cf06313d6e362b6b861cf3aab62d5b9e.tar.gz
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0 myisam/ft_boolean_search.c: Auto merged myisam/ft_update.c: Auto merged
Diffstat (limited to 'myisam/ft_boolean_search.c')
-rw-r--r--myisam/ft_boolean_search.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c
index c41c699bf5b..4acce93e3ab 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -229,11 +229,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
return ftb;
}
-void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc)
+void _ftb_climb_the_tree(FTB_WORD *ftbw)
{
FTB_EXPR *ftbe;
float weight=ftbw->weight;
int yn=ftbw->yesno;
+ my_off_t curdoc=ftbw->docid;
for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up)
{
@@ -307,7 +308,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record)
{
while (curdoc==(ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid)
{
- _ftb_climb_the_tree(ftbw, curdoc);
+ _ftb_climb_the_tree(ftbw);
/* update queue */
r=_mi_search(info, keyinfo, (uchar*) ftbw->word, USE_WHOLE_KEY,
@@ -401,12 +402,13 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
for (i=1; i<=ftb->queue.elements; i++)
{
ftbw=(FTB_WORD *)(ftb->queue.root[i]);
+ ftbw->docid=docid;
ptree.custom_arg=(void *)(ftbw->trunc);
word.pos=ftbw->word+1;
word.len=ftbw->len-1;
if (tree_search(& ptree, & word))
{ /* found! */
- _ftb_climb_the_tree(ftbw, docid);
+ _ftb_climb_the_tree(ftbw);
}
else
{ /* not found! */