Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8fdc781

Browse files
committed
Please, apply attached patch for contrib/tsearch to 7.2.1 and current
CVS. It fix english stemmer's problem with ending words like 'technology'. We have found one more bug in english stemmer. The bug is with 'irregular' english words like 'skies' -> 'sky'. Please, apply attached cumulative patch to 7.2.1 and current CVS instead previous one. Thank to Thomas T. Thai <tom@minnesota.com> for hard testing. This kind of bug has significance only for dump/reload database and viewing, but searching/indexing works right. Teodor Sigaev
1 parent 6024ac1 commit 8fdc781

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

contrib/tsearch/dict/porter_english.dct

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static void step_2(struct english_stemmer * z)
577577
case 'g':
578578
if (ends(z, "logi", 4))
579579
{ z->j++; /*-NEW-*/ /*(Barry Wilkins)*/
580-
r(z, "og", 3); break;
580+
r(z, "og", 2); break;
581581
} /*-DEPARTURE-*/
582582

583583
/* To match the published algorithm, delete this line */
@@ -683,7 +683,10 @@ static const char * english_stem(void * z_, const char * q, int i0, int i1)
683683

684684

685685
{ const char * t = search_pool(z->irregulars, z->k + 1, z->p);
686-
if (t != 0) return t;
686+
if (t != 0) {
687+
z->k = strlen(t) - 1;
688+
return t;
689+
}
687690
}
688691

689692
if (z->k > 1) /*-DEPARTURE-*/

0 commit comments

Comments
 (0)