|
- to_tsvector( config> regconfig> , document> text)
+ to_tsvector( config> regconfig> , document> text)
tsvector
reduce document text to tsvector>
to_tsvector('english', 'The Fat Rats')
'fat':2 'rat':3
|
- length(tsvector>)
+ length(tsvector>)
integer
number of lexemes in tsvector>
length('fat:2,4 cat:3 rat:5A'::tsvector)
3
|
- setweight(tsvector>, "char">)
+ setweight(tsvector>, "char">)
tsvector
assign weight to each element of tsvector>
setweight('fat:2,4 cat:3 rat:5B'::tsvector, 'A')
'cat':3A 'fat':2A,4A 'rat':5A
|
- strip(tsvector>)
+ strip(tsvector>)
tsvector
remove positions and weights from tsvector>
strip('fat:2,4 cat:3 rat:5A'::tsvector)
'cat' 'fat' 'rat'
|
- to_tsquery( config> regconfig> , query> text)
+ to_tsquery( config> regconfig> , query> text)
tsquery
normalize words and convert to tsquery>
to_tsquery('english', 'The & Fat & Rats')
'fat' & 'rat'
|
- plainto_tsquery( config> regconfig> , query> text)
+ plainto_tsquery( config> regconfig> , query> text)
tsquery
produce tsquery> ignoring punctuation
plainto_tsquery('english', 'The Fat Rats')
'fat' & 'rat'
|
- numnode(tsquery>)
+ numnode(tsquery>)
integer
number of lexemes plus operators in tsquery>
numnode('(fat & rat) | cat'::tsquery)
5
|
- querytree(query tsquery>)
+ querytree(query tsquery>)
text
get indexable part of a tsquery>
querytree('foo & ! bar'::tsquery)
'foo'
|
- ts_rank( weights float4[]>, vector tsvector>, query tsquery> , normalization integer> )
+ ts_rank( weights float4[]>, vector tsvector>, query tsquery> , normalization integer> )
float4
rank document for query
ts_rank(textsearch, query)
0.818
|
- ts_rank_cd( weights float4[]>, vector tsvector>, query tsquery> , normalization integer> )
+ ts_rank_cd( weights float4[]>, vector tsvector>, query tsquery> , normalization integer> )
float4
rank document for query using cover density
ts_rank_cd('{0.1, 0.2, 0.4, 1.0}', textsearch, query)
2.01317
|
- ts_headline( config regconfig>, document text>, query tsquery> , options text> )
+ ts_headline( config regconfig>, document text>, query tsquery> , options text> )
text
display a query match
ts_headline('x y z', 'z'::tsquery)
x y <b>z</b>
|
- ts_rewrite(query tsquery>, target tsquery>, substitute tsquery>)
+ ts_rewrite(query tsquery>, target tsquery>, substitute tsquery>)
tsquery
replace target with substitute within query
ts_rewrite('a & b'::tsquery, 'a'::tsquery, 'foo|bar'::tsquery)
'b' & ( 'foo' | 'bar' )
|
- ts_rewrite(query tsquery>, select text>)
+ ts_rewrite(query tsquery>, select text>)
tsquery
replace using targets and substitutes from a SELECT> command
SELECT ts_rewrite('a & b'::tsquery, 'SELECT t,s FROM aliases')
'b' & ( 'foo' | 'bar' )
|
- get_current_ts_config()
+ get_current_ts_config()
regconfig
get default text search configuration
get_current_ts_config()
english
|
- tsvector_update_trigger()
+ tsvector_update_trigger()
trigger
trigger function for automatic tsvector> column update
CREATE TRIGGER ... tsvector_update_trigger(tsvcol, 'pg_catalog.swedish', title, body)
|
- tsvector_update_trigger_column()
+ tsvector_update_trigger_column()
trigger
trigger function for automatic tsvector> column update
CREATE TRIGGER ... tsvector_update_trigger_column(tsvcol, configcol, title, body)
-