Get full list of full text search configuration languages
Asked Answered
C

1

37

to_tsvector() supports several languages: english, german, french ...

How to get full list of these languages ?

Contrite answered 28/9, 2016 at 15:33 Comment(0)
W
53

There are instructions in the manual how to retrieve all information with psql:

12.10. psql Support

Information about text search configuration objects can be obtained in psql using a set of commands:

\dF{d,p,t}[+] [PATTERN]

In particular:

List text search dictionaries (add + for more detail).

=> \dFd

There is more, read the manual.

Ultimately, possible parameter values for to_tsvector(), to_tsquery() et al. are defined by entries in the system catalog pg_ts_config, from where you can get the definitive list. As of Postgres 14:

test=> SELECT cfgname FROM pg_ts_config;
  cfgname   
------------
 simple
 arabic
 armenian
 basque
 catalan
 danish
 dutch
 english
 finnish
 french
 german
 greek
 hindi
 hungarian
 indonesian
 irish
 italian
 lithuanian
 nepali
 norwegian
 portuguese
 romanian
 russian
 serbian
 spanish
 swedish
 tamil
 turkish
 yiddish
(29 rows)

But more can be added.

Woolgathering answered 28/9, 2016 at 16:5 Comment(4)
Thank you very much. But more can be added - you mean in future? or there is possible add another language manually right now? after searching I found nothing hopeful about this.Contrite
@OTARIKI: Both: you can add more yourself (never done that myself, but the infrastructure is there), or Postgres might release more.Woolgathering
@ErwinBrandstetter, can you help me to find docs to add a new language?Strychnine
@AliMamedov: Guess you want to create a new TEXT SEARCH CONFIGURATION. Start here: postgresql.org/docs/current/textsearch-configuration.html Related posts: stackoverflow.com/…Woolgathering

© 2022 - 2024 — McMap. All rights reserved.