diff options
author | Bruce Momjian | 2007-08-28 03:10:45 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-08-28 03:10:45 +0000 |
commit | baf3a134d9f2184907914acae0361154a0e63424 (patch) | |
tree | 78db25a5e78612e3fde9ec7c40903b5609f8555c | |
parent | 56cbd2932823512e82f6ae4099c91a9347b24700 (diff) |
Mention configurations early in text search documentation to table/index
section makes a little more sense.
-rw-r--r-- | doc/src/sgml/textsearch.sgml | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 5124bd80ae3..ee2812accab 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -329,8 +329,27 @@ The form <type>text</type> <literal>@@</literal> <type>tsquery</type> is equivalent to <literal>to_tsvector(x) @@ y</literal>. The form <type>text</type> <literal>@@</literal> <type>text</type> is equivalent to <literal>to_tsvector(x) @@ plainto_tsquery(y)</literal>. -Note that the results of these forms will depend on the setting of <xref -linkend="guc-default-text-search-config">. +</para> + +<sect2 id="textsearch-configurations"> +<title>Configurations</title> + +<indexterm zone="textsearch-configurations"> +<primary>configurations</primary> +</indexterm> + +<para> +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 <emphasis>configurations</>. +Fortunately, <productname>PostgreSQL</> comes with predefined +configurations for many languages. (<application>psql</>'s <command>\dF</> +shows all predefined configurations.) During installation an appropriate +configuration was selected and <xref +linkend="guc-default-text-search-config"> was set accordingly. If you +need to change it, see <xref linkend="textsearch-tables-multiconfig">. </para> </sect2> @@ -2646,15 +2665,12 @@ database you must be careful to reference the proper text search configuration. This can be done by either setting <varname>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 <command>INSERT</> or <command>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.: <programlisting> CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('french', title || body)); </programlisting> -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 <literal>WHERE</> clause as well so the expression index will be used. </para> |