Commit 8e714e9f authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

committing to be able to pull

parent 22f71c2e
...@@ -226,11 +226,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query, ...@@ -226,11 +226,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
return ftb; 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; FTB_EXPR *ftbe;
float weight=ftbw->weight; float weight=ftbw->weight;
int yn=ftbw->yesno; int yn=ftbw->yesno;
my_off_t curdoc=ftbw->docid;
for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up) for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up)
{ {
...@@ -303,7 +304,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record) ...@@ -303,7 +304,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record)
{ {
while (curdoc==(ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid) while (curdoc==(ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid)
{ {
_ftb_climb_the_tree(ftbw, curdoc); _ftb_climb_the_tree(ftbw);
/* update queue */ /* update queue */
r=_mi_search(info, keyinfo, (uchar*) ftbw->word, USE_WHOLE_KEY, r=_mi_search(info, keyinfo, (uchar*) ftbw->word, USE_WHOLE_KEY,
...@@ -396,12 +397,13 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length) ...@@ -396,12 +397,13 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
for (i=1; i<=ftb->queue.elements; i++) for (i=1; i<=ftb->queue.elements; i++)
{ {
ftbw=(FTB_WORD *)(ftb->queue.root[i]); ftbw=(FTB_WORD *)(ftb->queue.root[i]);
ftbw->docid=docid;
ptree.custom_arg=(void *)(ftbw->trunc); ptree.custom_arg=(void *)(ftbw->trunc);
word.pos=ftbw->word+1; word.pos=ftbw->word+1;
word.len=ftbw->len-1; word.len=ftbw->len-1;
if (tree_search(& ptree, & word)) if (tree_search(& ptree, & word))
{ /* found! */ { /* found! */
_ftb_climb_the_tree(ftbw, docid); _ftb_climb_the_tree(ftbw);
} }
else else
{ /* not found! */ { /* not found! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment