summaryrefslogtreecommitdiff
path: root/myisam/ft_parser.c
diff options
context:
space:
mode:
authorserg@serg.mysql.com <>2003-01-21 19:24:34 +0100
committerserg@serg.mysql.com <>2003-01-21 19:24:34 +0100
commit0dff67cba243fa260bf901c443c7abaaa68567a9 (patch)
tree2c7d9d1b4d148a8335c0f806f6c7bc3dcab8e3ce /myisam/ft_parser.c
parent241f4143e87682942e90ac97b9965f2c77b107b2 (diff)
downloadmariadb-git-0dff67cba243fa260bf901c443c7abaaa68567a9.tar.gz
Two-level index structure for FULLTEXT indexes
Diffstat (limited to 'myisam/ft_parser.c')
-rw-r--r--myisam/ft_parser.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 358706a8ffa..14c67333734 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -18,21 +18,10 @@
#include "ftdefs.h"
-#ifdef EVAL_RUN
-#ifdef PIVOT_STAT
-ulong collstat=0;
-#endif
-#endif /* EVAL_RUN */
-
typedef struct st_ft_docstat {
FT_WORD *list;
uint uniq;
double sum;
-#ifdef EVAL_RUN
- uint words, totlen;
- double max, nsum, nsum2;
-#endif /* EVAL_RUN */
-
} FT_DOCSTAT;
static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2)
@@ -44,15 +33,7 @@ static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2)
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
{
word->weight=LWS_IN_USE;
-
-#ifdef EVAL_RUN
- word->cnt= (uchar) count;
- if(docstat->max < word->weight) docstat->max=word->weight;
- docstat->words+=count;
- docstat->totlen+=word->len;
-#endif /* EVAL_RUN */
docstat->sum+=word->weight;
-
memcpy_fixed((docstat->list)++,word,sizeof(FT_WORD));
return 0;
}
@@ -70,9 +51,6 @@ FT_WORD * ft_linearize(TREE *wtree)
{
docstat.list=wlist;
docstat.uniq=wtree->elements_in_tree;
-#ifdef EVAL_RUN
- docstat.nsum=docstat.nsum2=docstat.max=docstat.words=docstat.totlen=
-#endif /* EVAL_RUN */
docstat.sum=0;
tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right);
}
@@ -85,18 +63,8 @@ FT_WORD * ft_linearize(TREE *wtree)
for (p=wlist;p->pos;p++)
{
p->weight=PRENORM_IN_USE;
-#ifdef EVAL_RUN
- docstat.nsum+=p->weight;
- docstat.nsum2+=p->weight*p->weight;
-#endif /* EVAL_RUN */
}
-#ifdef EVAL_RUN
-#ifdef PIVOT_STAT
- collstat+=PIVOT_STAT;
-#endif
-#endif /* EVAL_RUN */
-
for (p=wlist;p->pos;p++)
{
p->weight/=NORM_IN_USE;