diff options
Diffstat (limited to 'src/backend/utils/adt/tsquery_cleanup.c')
-rw-r--r-- | src/backend/utils/adt/tsquery_cleanup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/adt/tsquery_cleanup.c b/src/backend/utils/adt/tsquery_cleanup.c index b77a7878dc6..94030a75d57 100644 --- a/src/backend/utils/adt/tsquery_cleanup.c +++ b/src/backend/utils/adt/tsquery_cleanup.c @@ -383,7 +383,7 @@ calcstrlen(NODE *node) * Remove QI_VALSTOP (stopword) nodes from TSQuery. */ TSQuery -cleanup_tsquery_stopwords(TSQuery in) +cleanup_tsquery_stopwords(TSQuery in, bool noisy) { int32 len, lenstr, @@ -403,8 +403,9 @@ cleanup_tsquery_stopwords(TSQuery in) root = clean_stopword_intree(maketree(GETQUERY(in)), &ladd, &radd); if (root == NULL) { - ereport(NOTICE, - (errmsg("text-search query contains only stop words or doesn't contain lexemes, ignored"))); + if (noisy) + ereport(NOTICE, + (errmsg("text-search query contains only stop words or doesn't contain lexemes, ignored"))); out = palloc(HDRSIZETQ); out->size = 0; SET_VARSIZE(out, HDRSIZETQ); |