Fixes about word with several infiniteve

This commit is contained in:
Teodor Sigaev 2003-11-27 16:04:40 +00:00
parent 9ea738827c
commit baeab89de6
2 changed files with 5 additions and 3 deletions

View File

@ -278,7 +278,7 @@ pushval_morph(QPRS_STATE * state, int typeval, char *strval, int lenval, int2 we
pushval_asis(state, VAL, prs.words[count].word, prs.words[count].len, weight);
pfree(prs.words[count].word);
if (count)
pushquery(state, OPR, (int4) '&', 0, 0, 0);
pushquery(state, OPR, (int4) '|', 0, 0, 0);
}
pfree(prs.words);

View File

@ -635,8 +635,10 @@ uniqueWORD(WORD * a, int4 l)
res->alen *= 2;
res->pos.apos = (uint16 *) repalloc(res->pos.apos, sizeof(uint16) * res->alen);
}
res->pos.apos[res->pos.apos[0] + 1] = LIMITPOS(ptr->pos.pos);
res->pos.apos[0]++;
if ( res->pos.apos[0]==0 || res->pos.apos[res->pos.apos[0]] != LIMITPOS(ptr->pos.pos) ) {
res->pos.apos[res->pos.apos[0] + 1] = LIMITPOS(ptr->pos.pos);
res->pos.apos[0]++;
}
}
}
ptr++;