From 99a01bfd1ece0adaa2d307ae00cfcc5de29e7a9c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 31 Aug 2007 04:52:29 +0000 Subject: [PATCH] In text search docs, properly use indexterm _zone_ only when we want an entire section, per Peter. --- doc/src/sgml/datatype.sgml | 32 +++++------ doc/src/sgml/func.sgml | 100 +++++++++++++++++------------------ doc/src/sgml/textsearch.sgml | 46 ++++++++-------- 3 files changed, 87 insertions(+), 91 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 4c8c0c56ca..67f96ce1f7 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ - + Data Types @@ -3281,20 +3281,18 @@ a0eebc999c0b4ef8bb6d6bb9bd380a11 - - tsvector - - tsvector - tsvector is a data type that represents a document and is - optimized for full text searching. In the simplest case, - tsvector is a sorted list of lexemes, so even without indexes - full text searches perform better than standard ~ and - LIKE operations: + tsvector + tsvector is a data type + that represents a document and is optimized for full text searching. + In the simplest case, tsvector is a sorted list of + lexemes, so even without indexes full text searches perform better + than standard ~ and LIKE + operations: SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector; @@ -3355,19 +3353,17 @@ SELECT 'fat:1 rat:2'::tsvector || 'fat:1 cat:2'::tsvector; - - tsquery - - tsquery - tsquery is a data type for textual queries which supports - the boolean operators & (AND), | (OR), - and parentheses. A tsquery consists of lexemes - (optionally labeled by letters) with boolean operators in between: + tsquery + tsquery is a data type + for textual queries which supports the boolean operators + & (AND), | (OR), and + parentheses. A tsquery consists of lexemes (optionally + labeled by letters) with boolean operators in between: SELECT 'fat & cat'::tsquery; diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6e56fa4335..d3f831e81b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -7585,8 +7585,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple - - TSVECTOR @@ TSQUERY + + TSVECTOR @@ TSQUERY @@ -7620,8 +7620,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'fat & cow':: - - TEXT @@ TSQUERY + + TEXT @@ TSQUERY @@ -7652,8 +7652,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::text @@ 'cat & cow'::tsqu - - TEXT @@ TEXT + + TEXT @@ TEXT @@ -7701,8 +7701,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - to_tsvector + + to_tsvector @@ -7723,8 +7723,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - strip + + strip @@ -7746,8 +7746,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - setweight + + setweight @@ -7771,8 +7771,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - tsvector concatenation + + tsvector concatenation @@ -7802,8 +7802,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - length(tsvector) + + length(tsvector) @@ -7821,8 +7821,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - text::tsvector + + text::tsvector @@ -7846,9 +7846,9 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow'; - - trigger - for updating a derived tsvector column + + trigger + for updating a derived tsvector column @@ -7896,8 +7896,8 @@ tsvector_update_trigger(tsv, 'pg_catalog.english', strMessage); - - ts_stat + + ts_stat @@ -7943,8 +7943,8 @@ LIMIT 10; - - Btree operations for tsvector + + Btree operations for tsvector @@ -7979,8 +7979,8 @@ LIMIT 10; - - to_tsquery + + to_tsquery @@ -8026,8 +8026,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab'); - - plainto_tsquery + + plainto_tsquery @@ -8051,8 +8051,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab'); - - querytree + + querytree @@ -8081,8 +8081,8 @@ SELECT querytree(to_tsquery('!defined')); - - text::tsquery casting + + text::tsquery casting @@ -8107,8 +8107,8 @@ SELECT querytree(to_tsquery('!defined')); - - numnode + + numnode @@ -8146,8 +8146,8 @@ SELECT numnode(plainto_tsquery('long table')); - - TSQUERY && TSQUERY + + TSQUERY && TSQUERY @@ -8165,8 +8165,8 @@ SELECT numnode(plainto_tsquery('long table')); - - TSQUERY || TSQUERY + + TSQUERY || TSQUERY @@ -8184,8 +8184,8 @@ SELECT numnode(plainto_tsquery('long table')); - - !! TSQUERY + + !! TSQUERY @@ -8203,8 +8203,8 @@ SELECT numnode(plainto_tsquery('long table')); - - Btree operations for tsquery + + Btree operations for tsquery @@ -8257,8 +8257,8 @@ INSERT INTO aliases VALUES('a', 'c'); - - ts_rewrite + + ts_rewrite @@ -8404,8 +8404,8 @@ WHERE 'a & b' @> t; - - TSQUERY @> TSQUERY + + TSQUERY @> TSQUERY @@ -8423,8 +8423,8 @@ WHERE 'a & b' @> t; - - tsquery <@ tsquery + + tsquery <@ tsquery diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index bfa8338085..18e6aa7c64 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -241,8 +241,8 @@ SELECT 'fat & cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t Configurations - text search - configurations + text search + configurations @@ -429,6 +429,11 @@ ORDER BY rank DESC LIMIT 10; Parsing + + text search + parse + + Full text searching in PostgreSQL provides function to_tsvector, which converts a document to @@ -544,11 +549,6 @@ UPDATE tt SET ti= - - text search - parse - - ts_parse(parser, document TEXT) returns SETOF tokenout @@ -579,8 +579,8 @@ SELECT * FROM ts_parse('default','123 - a number'); - text search - ts_token_type + text search + ts_token_type @@ -667,8 +667,8 @@ SELECT * FROM ts_token_type('default'); - text search - ts_rank + text search + ts_rank @@ -704,8 +704,8 @@ SELECT * FROM ts_token_type('default'); - text search - ts_rank_cd + text search + ts_rank_cd @@ -855,8 +855,8 @@ ORDER BY rnk DESC LIMIT 10; Highlighting Results - text search - headline + text search + headline @@ -1576,8 +1576,8 @@ CREATE TEXT SEARCH DICTIONARY english_stem ( - text search - ts_lexize + text search + ts_lexize @@ -1821,13 +1821,13 @@ SHOW default_text_search_config; - text search - GiST + text search + GiST @@ -1848,13 +1848,13 @@ SHOW default_text_search_config; - text search - GIN + text search + GIN