summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2006-06-02 17:55:40 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2006-06-02 17:55:40 +0000
commitefe1d427dae112328205960d47b0ef918c36fea7 (patch)
treeaba0a93ef0ef08c7af0fbe2e3c6f98ea1c8e06d6
parentc7faf451608a08e1aa65951bb02fac7f524f1d7c (diff)
Distinguish between stop-word recognized in thesaurus_lexize()
-rw-r--r--contrib/tsearch2/dict_thesaurus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/tsearch2/dict_thesaurus.c b/contrib/tsearch2/dict_thesaurus.c
index a584aa15b72..7138a1dc7df 100644
--- a/contrib/tsearch2/dict_thesaurus.c
+++ b/contrib/tsearch2/dict_thesaurus.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.2 2006/06/02 15:35:42 teodor Exp $ */
+/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.3 2006/06/02 17:55:40 teodor Exp $ */
/*
* thesaurus
@@ -728,10 +728,11 @@ thesaurus_lexize(PG_FUNCTION_ARGS)
info = findVariant( info, stored, curpos, infos, nlex);
}
-
- } else {
+ } else if ( res ) { /* stop-word */
LexemeInfo *infos = findTheLexeme(d, NULL);
info = findVariant( NULL, stored, curpos, &infos, 1);
+ } else {
+ info = NULL; /* word isn't recognized */
}
dstate->private = (void*)info;