Short patch to clarify the name of the column used for the text search
index example, so everybody is clear it is a column name.

Unrelated to other discussions on hackers

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com
Index: doc/src/sgml/textsearch.sgml
===================================================================
RCS file: /home/sriggs/pg/REPOSITORY/pgsql/doc/src/sgml/textsearch.sgml,v
retrieving revision 1.31
diff -c -r1.31 textsearch.sgml
*** doc/src/sgml/textsearch.sgml	10 Nov 2007 15:39:34 -0000	1.31
--- doc/src/sgml/textsearch.sgml	12 Nov 2007 16:18:25 -0000
***************
*** 538,552 ****
      indexed when the other is <literal>NULL</>:
  
  <programlisting>
! ALTER TABLE pgweb ADD COLUMN textsearch_index tsvector;
! UPDATE pgweb SET textsearch_index =
       to_tsvector('english', coalesce(title,'') || coalesce(body,''));
  </programlisting>
  
      Then we create a <acronym>GIN</acronym> index to speed up the search:
  
  <programlisting>
! CREATE INDEX textsearch_idx ON pgweb USING gin(textsearch_index);
  </programlisting>
  
      Now we are ready to perform a fast full text search:
--- 538,552 ----
      indexed when the other is <literal>NULL</>:
  
  <programlisting>
! ALTER TABLE pgweb ADD COLUMN textsearchable_index_col tsvector;
! UPDATE pgweb SET textsearchable_index_col =
       to_tsvector('english', coalesce(title,'') || coalesce(body,''));
  </programlisting>
  
      Then we create a <acronym>GIN</acronym> index to speed up the search:
  
  <programlisting>
! CREATE INDEX textsearch_idx ON pgweb USING gin(textsearchable_index_col);
  </programlisting>
  
      Now we are ready to perform a fast full text search:
***************
*** 554,560 ****
  <programlisting>
  SELECT title
  FROM pgweb
! WHERE to_tsquery('create &amp; table') @@ textsearch_index
  ORDER BY last_mod_date DESC LIMIT 10;
  </programlisting>
     </para>
--- 554,560 ----
  <programlisting>
  SELECT title
  FROM pgweb
! WHERE textsearchable_index_col @@ to_tsquery('create &amp; table')
  ORDER BY last_mod_date DESC LIMIT 10;
  </programlisting>
     </para>
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to