diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-03-05 06:10:28 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-03-05 06:10:28 +0000 |
commit | 8fdc7814d0450276362f6e1809c5813ceb90a7d4 (patch) | |
tree | dbd0f9f62261334a1be8a622097452982da65d3e /contrib | |
parent | 6024ac1ba02e2f2220ae34a06418db21f1bc93e3 (diff) | |
download | postgresql-8fdc7814d0450276362f6e1809c5813ceb90a7d4.tar.gz postgresql-8fdc7814d0450276362f6e1809c5813ceb90a7d4.zip |
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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/tsearch/dict/porter_english.dct | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/tsearch/dict/porter_english.dct b/contrib/tsearch/dict/porter_english.dct index 1f809df9c8c..5158a9b8762 100644 --- a/contrib/tsearch/dict/porter_english.dct +++ b/contrib/tsearch/dict/porter_english.dct @@ -577,7 +577,7 @@ static void step_2(struct english_stemmer * z) case 'g': if (ends(z, "logi", 4)) { z->j++; /*-NEW-*/ /*(Barry Wilkins)*/ - r(z, "og", 3); break; + r(z, "og", 2); break; } /*-DEPARTURE-*/ /* 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) { const char * t = search_pool(z->irregulars, z->k + 1, z->p); - if (t != 0) return t; + if (t != 0) { + z->k = strlen(t) - 1; + return t; + } } if (z->k > 1) /*-DEPARTURE-*/ |