1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Clean up some stray references to tsearch2.

This commit is contained in:
Tom Lane
2007-11-13 23:36:26 +00:00
parent 07c23731f2
commit b40c0a4bb0
5 changed files with 41 additions and 38 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.11 2007/02/16 03:50:29 momjian Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.12 2007/11/13 23:36:26 tgl Exp $ -->
<chapter id="GIN"> <chapter id="GIN">
<title>GIN Indexes</title> <title>GIN Indexes</title>
@ -232,13 +232,20 @@
<para> <para>
The <productname>PostgreSQL</productname> source distribution includes The <productname>PostgreSQL</productname> source distribution includes
<acronym>GIN</acronym> classes for one-dimensional arrays of all internal <acronym>GIN</acronym> operator classes for <type>tsvector</> and
types. The following for one-dimensional arrays of all internal types. The following
<filename>contrib</> modules also contain <acronym>GIN</acronym> <filename>contrib</> modules also contain <acronym>GIN</acronym>
operator classes: operator classes:
</para> </para>
<variablelist> <variablelist>
<varlistentry>
<term>hstore</term>
<listitem>
<para>Module for storing (key, value) pairs</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>intarray</term> <term>intarray</term>
<listitem> <listitem>
@ -247,11 +254,9 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tsearch2</term> <term>pg_trgm</term>
<listitem> <listitem>
<para>Support for inverted text indexing. This is much faster for very <para>Text similarity using trigram matching</para>
large, mostly-static sets of documents.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/gist.sgml,v 1.28 2007/01/31 20:56:17 momjian Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/gist.sgml,v 1.29 2007/11/13 23:36:26 tgl Exp $ -->
<chapter id="GiST"> <chapter id="GiST">
<title>GiST Indexes</title> <title>GiST Indexes</title>
@ -181,8 +181,9 @@
<para> <para>
The <productname>PostgreSQL</productname> source distribution includes The <productname>PostgreSQL</productname> source distribution includes
several examples of index methods implemented using several examples of index methods implemented using
<acronym>GiST</acronym>. The core system currently provides R-Tree <acronym>GiST</acronym>. The core system currently provides text search
equivalent functionality for some of the built-in geometric data types support (indexing for <type>tsvector</> and <type>tsquery</>) as well as
R-Tree equivalent functionality for some of the built-in geometric data types
(see <filename>src/backend/access/gist/gistproc.c</>). The following (see <filename>src/backend/access/gist/gistproc.c</>). The following
<filename>contrib</> modules also contain <acronym>GiST</acronym> <filename>contrib</> modules also contain <acronym>GiST</acronym>
operator classes: operator classes:
@ -203,6 +204,13 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>hstore</term>
<listitem>
<para>Module for storing (key, value) pairs</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>intarray</term> <term>intarray</term>
<listitem> <listitem>
@ -230,13 +238,6 @@
<para>Indexing for <quote>float ranges</quote></para> <para>Indexing for <quote>float ranges</quote></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>tsearch2</term>
<listitem>
<para>Full text indexing</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</sect1> </sect1>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.71 2007/04/06 22:33:41 tgl Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.72 2007/11/13 23:36:26 tgl Exp $ -->
<chapter id="indexes"> <chapter id="indexes">
<title id="indexes-title">Indexes</title> <title id="indexes-title">Indexes</title>
@ -235,8 +235,6 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
(See <xref linkend="functions-geometry"> for the meaning of (See <xref linkend="functions-geometry"> for the meaning of
these operators.) these operators.)
Also, an <literal>IS NULL</> condition on
an index column can be used with a GiST index.
Many other GiST operator Many other GiST operator
classes are available in the <literal>contrib</> collection or as separate classes are available in the <literal>contrib</> collection or as separate
projects. For more information see <xref linkend="GiST">. projects. For more information see <xref linkend="GiST">.
@ -269,10 +267,9 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
(See <xref linkend="functions-array"> for the meaning of (See <xref linkend="functions-array"> for the meaning of
these operators.) these operators.)
GIN indexes cannot use <literal>IS NULL</> as a search condition. Many other GIN operator
Other GIN operator classes are available in the <literal>contrib</> classes are available in the <literal>contrib</> collection or as separate
<literal>tsearch2</literal> and <literal>intarray</literal> modules. projects. For more information see <xref linkend="GIN">.
For more information see <xref linkend="GIN">.
</para> </para>
</sect1> </sect1>

View File

@ -131,24 +131,24 @@ ORDER BY
</sect2> </sect2>
<sect2> <sect2>
<title>Tsearch2 Integration</title> <title>Text Search Integration</title>
<para> <para>
Trigram matching is a very useful tool when used in conjunction Trigram matching is a very useful tool when used in conjunction
with a text index created by the Tsearch2 contrib module. (See with a full text index.
contrib/tsearch2)
</para> </para>
<para> <para>
The first step is to generate an auxiliary table containing all The first step is to generate an auxiliary table containing all
the unique words in the Tsearch2 index: the unique words in the documents:
</para> </para>
<programlisting> <programlisting>
CREATE TABLE words AS SELECT word FROM CREATE TABLE words AS SELECT word FROM
stat('SELECT to_tsvector(''simple'', bodytext) FROM documents'); stat('SELECT to_tsvector(''simple'', bodytext) FROM documents');
</programlisting> </programlisting>
<para> <para>
Where 'documents' is a table that has a text field 'bodytext' where <structname>documents</> is a table that has a text field
that TSearch2 is used to search. The use of the 'simple' dictionary <structfield>bodytext</> that we wish to search. The use of the
with the to_tsvector function, instead of just using the already <literal>simple</> configuration with the <function>to_tsvector</>
function, instead of just using the already
existing vector is to avoid creating a list of already stemmed existing vector is to avoid creating a list of already stemmed
words. This way, only the original, unstemmed words are added words. This way, only the original, unstemmed words are added
to the word list. to the word list.
@ -174,9 +174,9 @@ CREATE INDEX words_idx ON words USING gin(word gist_trgm_ops);
<para> <para>
<note> <note>
<para> <para>
Since the 'words' table has been generated as a separate, Since the <structname>words</> table has been generated as a separate,
static table, it will need to be periodically regenerated so that static table, it will need to be periodically regenerated so that
it remains up to date with the word list in the Tsearch2 index. it remains up to date with the document collection.
</para> </para>
</note> </note>
</para> </para>
@ -184,14 +184,14 @@ CREATE INDEX words_idx ON words USING gin(word gist_trgm_ops);
<sect2> <sect2>
<title>References</title> <title>References</title>
<para>
Tsearch2 Development Site
<ulink url="http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/"></ulink>
</para>
<para> <para>
GiST Development Site GiST Development Site
<ulink url="http://www.sai.msu.su/~megera/postgres/gist/"></ulink> <ulink url="http://www.sai.msu.su/~megera/postgres/gist/"></ulink>
</para> </para>
<para>
Tsearch2 Development Site
<ulink url="http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/"></ulink>
</para>
</sect2> </sect2>
<sect2> <sect2>

View File

@ -48,7 +48,7 @@ Features
* User-defined opclasses. (The scheme is similar to GiST.) * User-defined opclasses. (The scheme is similar to GiST.)
* Optimized index creation (Makes use of maintenance_work_mem to accumulate * Optimized index creation (Makes use of maintenance_work_mem to accumulate
postings in memory.) postings in memory.)
* Tsearch2 support via an opclass * Text search support via an opclass
* Soft upper limit on the returned results set using a GUC variable: * Soft upper limit on the returned results set using a GUC variable:
gin_fuzzy_search_limit gin_fuzzy_search_limit