|
|
|
|
@ -530,11 +530,11 @@ typedef struct |
|
|
|
|
int q; |
|
|
|
|
DocRepresentation *begin; |
|
|
|
|
DocRepresentation *end; |
|
|
|
|
} Extention; |
|
|
|
|
} CoverExt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool |
|
|
|
|
Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, Extention *ext) |
|
|
|
|
Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, CoverExt *ext) |
|
|
|
|
{ |
|
|
|
|
DocRepresentation *ptr; |
|
|
|
|
int lastpos = ext->pos; |
|
|
|
|
@ -729,7 +729,7 @@ calc_rank_cd(float4 *arrdata, TSVector txt, TSQuery query, int method) |
|
|
|
|
int len, |
|
|
|
|
i, |
|
|
|
|
doclen = 0; |
|
|
|
|
Extention ext; |
|
|
|
|
CoverExt ext; |
|
|
|
|
double Wdoc = 0.0; |
|
|
|
|
double invws[lengthof(weights)]; |
|
|
|
|
double SumDist = 0.0, |
|
|
|
|
@ -759,7 +759,7 @@ calc_rank_cd(float4 *arrdata, TSVector txt, TSQuery query, int method) |
|
|
|
|
return 0.0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MemSet(&ext, 0, sizeof(Extention)); |
|
|
|
|
MemSet(&ext, 0, sizeof(CoverExt)); |
|
|
|
|
while (Cover(doc, doclen, &qr, &ext)) |
|
|
|
|
{ |
|
|
|
|
double Cpos = 0.0; |
|
|
|
|
|