New features for tsearch2:
Teodor Sigaev <teodor@sigaev.ru>
New features for tsearch2:
1 Comparison operation for tsquery
2 Btree index on tsquery
3 numnode(tsquery) - returns 'length' of tsquery
4 tsquery @ tsquery, tsquery ~ tsquery - contains, contained for tsquery.
Note: They don't gurantee exact result, only MAY BE, so it
useful only for speed up rewrite functions
5 GiST index support for @,~
6 rewrite():
select rewrite(orig, what, to);
select rewrite(ARRAY[orig, what, to]) from tsquery_table;
select rewrite(orig, 'select what, to from tsquery_table;');
7 significantly improve cover algorithm
Files
| Path | Change | +/− |
|---|---|---|
| contrib/tsearch2/expected/tsearch2.out | modified | +283 −0 |
| contrib/tsearch2/Makefile | modified | +4 −3 |
| contrib/tsearch2/query.c | modified | +1 −1 |
| contrib/tsearch2/query_cleanup.c (from contrib/tsearch2/rewrite.c) | renamed | +1 −5 |
| contrib/tsearch2/query_cleanup.h (from contrib/tsearch2/rewrite.h) | renamed | +0 −0 |
| contrib/tsearch2/query_gist.c | added | +324 −0 |
| contrib/tsearch2/query.h | modified | +1 −1 |
| contrib/tsearch2/query_rewrite.c | added | +466 −0 |
| contrib/tsearch2/query_support.c | added | +76 −0 |
| contrib/tsearch2/query_util.c | added | +257 −0 |
| contrib/tsearch2/query_util.h | added | +44 −0 |
| contrib/tsearch2/rank.c | modified | +92 −102 |
| contrib/tsearch2/sql/tsearch2.sql | modified | +82 −0 |
| contrib/tsearch2/tsearch.sql.in | modified | +243 −0 |