• Publicity: Public Only All

tsearch2-driver-procs.tcl

Procedures for tsearch full text engine driver

Location:
packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl
Created:
2004-06-05
Author:
Dave Bauer <dave@thedesignexperience.org>
CVS Identification:
$Id: tsearch2-driver-procs.tcl,v 1.41.2.6 2021/02/24 18:05:21 gustafn Exp $

Procedures in this file

Detailed information

tsearch2::build_query (public)

 tsearch2::build_query [ -query query ]

Build query string for tsearch2

Switches:
-query (optional)
string to convert
Returns:
returns formatted query string for tsearch2 tsquery

Partial Call Graph (max 5 caller/called nodes):
%3 test_build_query build_query (test tsearch2-driver) tsearch2::build_query tsearch2::build_query test_build_query->tsearch2::build_query db_compatible_rdbms_p db_compatible_rdbms_p (public) tsearch2::build_query->db_compatible_rdbms_p db_version db_version (public) tsearch2::build_query->db_version

Testcases:
build_query

tsearch2::build_query_postgres (public)

 tsearch2::build_query_postgres [ -query query ]

Convert conjunctions to query characters for tsearch2 use websearch_to_tsquery which is integrated in postgres >= 11 websearch_to_tsquery creates a tsquery value from querytext using an alternative syntax in which simple unformatted text is a valid query. Unlike plainto_tsquery and phraseto_tsquery, it also recognizes certain operators. Moreover, this function should never raise syntax errors, which makes it possible to use raw user-supplied input for search. The following syntax is supported:

  • unquoted text: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.
  • "quoted text": text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery.
  • OR: logical or will be converted to the | operator.
  • -: the logical not operator, converted to the the ! operator.
For further documentation see also: https://www.postgresql.org/docs/11/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES

Switches:
-query (optional)
string to convert
Returns:
returns formatted query string for tsearch2 tsquery

Partial Call Graph (max 5 caller/called nodes):
%3 ad_try ad_try (public) db_1row db_1row (public) tsearch2::build_query_postgres tsearch2::build_query_postgres tsearch2::build_query_postgres->ad_try tsearch2::build_query_postgres->db_1row

Testcases:
No testcase defined.

tsearch2::build_query_tcl (public)

 tsearch2::build_query_tcl [ -query query ]

Convert conjunctions to query characters for tsearch2 and => & not => ! or => | space => | (or)

Switches:
-query (optional)
string to convert
Returns:
returns formatted query string for tsearch2 tsquery

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

tsearch2::driver_info (public)

 tsearch2::driver_info
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

tsearch2::index (public)

 tsearch2::index object_id txt title keywords

add object to full text index

Parameters:
object_id
txt
title
keywords
Returns:
nothing
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05

Partial Call Graph (max 5 caller/called nodes):
%3 db_0or1row db_0or1row (public) db_dml db_dml (public) tsearch2::index tsearch2::index tsearch2::index->db_0or1row tsearch2::index->db_dml

Testcases:
No testcase defined.

tsearch2::separate_query_and_operators (public)

 tsearch2::separate_query_and_operators [ -query query ]

Separates special operators from full text query

Switches:
-query (optional)
Returns:
list of query and operators
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-07-10

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

tsearch2::summary (public)

 tsearch2::summary query txt

Highlights matching terms.

Parameters:
query
txt
Returns:
summary containing search query terms
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05

Partial Call Graph (max 5 caller/called nodes):
%3 db_string db_string (public) tsearch2::summary tsearch2::summary tsearch2::summary->db_string

Testcases:
No testcase defined.

tsearch2::unindex (public)

 tsearch2::unindex object_id

Remove item from FTS index

Parameters:
object_id
Returns:
nothing
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05

Partial Call Graph (max 5 caller/called nodes):
%3 db_dml db_dml (public) tsearch2::unindex tsearch2::unindex tsearch2::unindex->db_dml

Testcases:
No testcase defined.

tsearch2::update_index (public)

 tsearch2::update_index object_id txt title keywords

update full text index

Parameters:
object_id
txt
title
keywords
Returns:
nothing
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05

Partial Call Graph (max 5 caller/called nodes):
%3 db_0or1row db_0or1row (public) db_dml db_dml (public) tsearch2::update_index tsearch2::update_index tsearch2::update_index->db_0or1row tsearch2::update_index->db_dml

Testcases:
No testcase defined.
[ show source ]