0

I'm converting search text to tsquery with plainto_tsquery function. When running the following statement

select plainto_tsquery('english'::regconfig, 'what');

I get empty result. Server is: "PostgreSQL 13.13 on x86_64-pc-linux-gnu, compiled by Debian clang version 12.0.1, 64-bit".

What could be the reason for that?

0

1 Answer 1

0

It's because you haven't read the manuals:

https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-STOPWORDS

=> SELECT to_tsvector('french', 'what is it') AS fr, to_tsvector('english', 'what is it') AS en;
┌────────────────────────┬────┐
│           fr           │ en │
├────────────────────────┼────┤
│ 'is':2 'it':3 'what':1 │    │
└────────────────────────┴────┘
(1 row)
Sign up to request clarification or add additional context in comments.

1 Comment

Manuals are huge and I use PostgreSQL once in a full moon, so I can be excused I didn't find that at the time of writing the question. I found it later and when I returned here to close the question, I found it closed already. But good advice would be to use simple language to retain all the words.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.