10

What is the list of stop words (ignored words) used by Postgres when doing fulltext searches? Is there a way I can find this out (by running a query or something)?

So you know what I'm looking for, here is the list from MySQL. I'm guessing the Postgres one is similar http://dev.mysql.com/doc/refman/5.5/en/fulltext-stopwords.html

2 Answers 2

11

Look at: http://www.postgresql.org/docs/9.1/static/textsearch-dictionaries.html#TEXTSEARCH-STOPWORDS

The location of stopwords for english dictionary is: $SHAREDIR/tsearch_data/english.stop for instance: /usr/share/postgresql/9.1/tsearch_data/english.stop

2
  • that's exactly what I was looking for. I hadn't read the documentation carefully enough to find it.
    – Peter Meth
    Sep 25, 2012 at 20:55
  • 2
    You can find the share dir by running pg_config --sharedir
    – Flimm
    May 31, 2018 at 14:28
4

For Homebrew users on MacOS you can find the Postgres StopWord files here:

ls /usr/local/Cellar/postgresql/<%version%>/share/postgresql/tsearch_data

Alternatively the up-to-date list is available on Github:

https://github.com/postgres/postgres/tree/master/src/backend/snowball/stopwords

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .