Home > other >  Why does tsquery in postgres exclude the letter 't'?
Why does tsquery in postgres exclude the letter 't'?

Time:12-15

When I run the following statement in postgres it removes the letter 't' from the resulting tsquery:

Statement: select websearch_to_tsquery('english', 'xtp t');

Result: xtp

Same result with underscore separating:

Statement: select websearch_to_tsquery('english', 'xtp_t');

Result: xtp

However, if I substitute the 't' for any other letter I get the expected result:

Statement: select websearch_to_tsquery('english', 'xtp_l');

Result: 'xtp' <-> 'l'

Why does the letter 't' get removed from the result of the original query?

CodePudding user response:

Not any other letter. i, a, s, and t are considered stop words in English. 'I' and 'a' actually are very common words, s and t are presumably included because they occur in contractions and possessives, like "I can't stand dog's slobbery toys"

  • Related