Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbaeab89

Browse files
committed
Fixes about word with several infiniteve
1 parent9ea7388 commitbaeab89

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎contrib/tsearch2/query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pushval_morph(QPRS_STATE * state, int typeval, char *strval, int lenval, int2 we
278278
pushval_asis(state,VAL,prs.words[count].word,prs.words[count].len,weight);
279279
pfree(prs.words[count].word);
280280
if (count)
281-
pushquery(state,OPR, (int4)'&',0,0,0);
281+
pushquery(state,OPR, (int4)'|',0,0,0);
282282
}
283283
pfree(prs.words);
284284

‎contrib/tsearch2/tsvector.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,10 @@ uniqueWORD(WORD * a, int4 l)
635635
res->alen *=2;
636636
res->pos.apos= (uint16*)repalloc(res->pos.apos,sizeof(uint16)*res->alen);
637637
}
638-
res->pos.apos[res->pos.apos[0]+1]=LIMITPOS(ptr->pos.pos);
639-
res->pos.apos[0]++;
638+
if (res->pos.apos[0]==0||res->pos.apos[res->pos.apos[0]]!=LIMITPOS(ptr->pos.pos) ) {
639+
res->pos.apos[res->pos.apos[0]+1]=LIMITPOS(ptr->pos.pos);
640+
res->pos.apos[0]++;
641+
}
640642
}
641643
}
642644
ptr++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp