Skip to content

Commit efe1d42

Browse files
committed
Distinguish between stop-word recognized in thesaurus_lexize()
1 parent c7faf45 commit efe1d42

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

contrib/tsearch2/dict_thesaurus.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.2 2006/06/02 15:35:42 teodor Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.3 2006/06/02 17:55:40 teodor Exp $ */
22

33
/*
44
* thesaurus
@@ -728,10 +728,11 @@ thesaurus_lexize(PG_FUNCTION_ARGS)
728728

729729
info = findVariant( info, stored, curpos, infos, nlex);
730730
}
731-
732-
} else {
731+
} else if ( res ) { /* stop-word */
733732
LexemeInfo *infos = findTheLexeme(d, NULL);
734733
info = findVariant( NULL, stored, curpos, &infos, 1);
734+
} else {
735+
info = NULL; /* word isn't recognized */
735736
}
736737

737738
dstate->private = (void*)info;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy