diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 5124bd80ae..ee2812acca 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -329,8 +329,27 @@ The form text @@ tsquery is equivalent to to_tsvector(x) @@ y. The form text @@ text is equivalent to to_tsvector(x) @@ plainto_tsquery(y). -Note that the results of these forms will depend on the setting of . + + + +Configurations + + +configurations + + + +The above are all simple text search examples. As mentioned before, full +text search functionality includes the ability to do many more things: +skip indexing certain words (stop words), process synonyms, and use +sophisticated parsing, e.g. parse based on more than just white space. +This functionality is controlled by configurations. +Fortunately, PostgreSQL comes with predefined +configurations for many languages. (psql's \dF +shows all predefined configurations.) During installation an appropriate +configuration was selected and was set accordingly. If you +need to change it, see . @@ -2646,15 +2665,12 @@ database you must be careful to reference the proper text search configuration. This can be done by either setting default_text_search_config in each session or supplying the configuration name in every function call, e.g. to_tsquery('french', -'friend'), to_tsvector('english', col). If you are using an expression index, -you must also be sure to use the proper text search configuration every -time an INSERT or UPDATE is executed because these -will modify the index, or you can embed the configuration name into the -expression index, e.g.: +'friend'), to_tsvector('english', col). If you are using an expression +index you must embed the configuration name into the expression index, e.g.: CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('french', title || body)); -And if you do that, make sure you specify the configuration name in the +And for an expression index, specify the configuration name in the WHERE clause as well so the expression index will be used.