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.12 2022/09/12 16:26:11 antoniop Exp $

Procedures in this file

Detailed information

callback::search::driver_info::impl::tsearch2-driver (private)

 callback::search::driver_info::impl::tsearch2-driver

Search driver info callback

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 tsearch2::driver_info tsearch2::driver_info (private) callback::search::driver_info::impl::tsearch2-driver callback::search::driver_info::impl::tsearch2-driver callback::search::driver_info::impl::tsearch2-driver->tsearch2::driver_info

Testcases:
No testcase defined.

callback::search::search::impl::tsearch2-driver (private)

 callback::search::search::impl::tsearch2-driver [ -query query ] \
    [ -user_id user_id ] [ -offset offset ] [ -limit limit ] \
    [ -df df ] [ -dt dt ] [ -package_ids package_ids ] \
    [ -object_type object_type ] [ -extra_args extra_args ]

ftsenginedriver search operation implementation for tsearch2

Switches:
-query (optional)
-user_id (optional, defaults to "0")
-offset (optional, defaults to "0")
-limit (optional, defaults to "10")
-df (optional)
-dt (optional)
-package_ids (optional)
-object_type (optional)
-extra_args (optional)
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-05
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 callback callback (public) db_list db_list (public) db_map db_map (public) db_string db_string (public) tsearch2::build_query tsearch2::build_query (private) callback::search::search::impl::tsearch2-driver callback::search::search::impl::tsearch2-driver callback::search::search::impl::tsearch2-driver->callback callback::search::search::impl::tsearch2-driver->db_list callback::search::search::impl::tsearch2-driver->db_map callback::search::search::impl::tsearch2-driver->db_string callback::search::search::impl::tsearch2-driver->tsearch2::build_query

Testcases:
No testcase defined.

tsearch2::build_query (private)

 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 callback::search::search::impl::tsearch2-driver callback::search::search::impl::tsearch2-driver (private) tsearch2::build_query tsearch2::build_query callback::search::search::impl::tsearch2-driver->tsearch2::build_query tsearch2::summary tsearch2::summary (public) tsearch2::summary->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 tsearch2::build_query_postgres tsearch2::build_query_postgres (private) tsearch2::build_query->tsearch2::build_query_postgres tsearch2::build_query_tcl tsearch2::build_query_tcl (public) tsearch2::build_query->tsearch2::build_query_tcl

Testcases:
No testcase defined.

tsearch2::build_query_postgres (private)

 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 ! 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 tsearch2::build_query tsearch2::build_query (private) tsearch2::build_query_postgres tsearch2::build_query_postgres tsearch2::build_query->tsearch2::build_query_postgres ad_try ad_try (public) tsearch2::build_query_postgres->ad_try db_1row db_1row (public) tsearch2::build_query_postgres->db_1row tsearch2::build_query_tcl tsearch2::build_query_tcl (public) tsearch2::build_query_postgres->tsearch2::build_query_tcl

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 test_build_query_tcl build_query_tcl (test tsearch2-driver) tsearch2::build_query_tcl tsearch2::build_query_tcl test_build_query_tcl->tsearch2::build_query_tcl tsearch2::build_query tsearch2::build_query (private) tsearch2::build_query->tsearch2::build_query_tcl tsearch2::build_query_postgres tsearch2::build_query_postgres (private) tsearch2::build_query_postgres->tsearch2::build_query_tcl

Testcases:
build_query_tcl

tsearch2::driver_info (private)

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

Partial Call Graph (max 5 caller/called nodes):
%3 test_driver_info driver_info (test tsearch2-driver) tsearch2::driver_info tsearch2::driver_info test_driver_info->tsearch2::driver_info AcsSc.ftsenginedriver.info.tsearch2_driver AcsSc.ftsenginedriver.info.tsearch2_driver (private) AcsSc.ftsenginedriver.info.tsearch2_driver->tsearch2::driver_info callback::search::driver_info::impl::tsearch2-driver callback::search::driver_info::impl::tsearch2-driver (private) callback::search::driver_info::impl::tsearch2-driver->tsearch2::driver_info

Testcases:
driver_info

tsearch2::index (public)

 tsearch2::index object_id txt title keywords

Add or update an object in the full text index.

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

Partial Call Graph (max 5 caller/called nodes):
%3 test_index_unindex index_unindex (test tsearch2-driver) tsearch2::index tsearch2::index test_index_unindex->tsearch2::index db_dml db_dml (public) tsearch2::index->db_dml tsearch2::trunc_to_max tsearch2::trunc_to_max (private) tsearch2::index->tsearch2::trunc_to_max AcsSc.ftsenginedriver.index.tsearch2_driver AcsSc.ftsenginedriver.index.tsearch2_driver (private) AcsSc.ftsenginedriver.index.tsearch2_driver->tsearch2::index AcsSc.ftsenginedriver.update_index.tsearch2_driver AcsSc.ftsenginedriver.update_index.tsearch2_driver (private) AcsSc.ftsenginedriver.update_index.tsearch2_driver->tsearch2::index tsearch2::update_index tsearch2::update_index (public, deprecated) tsearch2::update_index->tsearch2::index

Testcases:
index_unindex

tsearch2::separate_query_and_operators (private)

 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 tsearch2_driver::valid_operators tsearch2_driver::valid_operators (private) tsearch2::separate_query_and_operators tsearch2::separate_query_and_operators tsearch2::separate_query_and_operators->tsearch2_driver::valid_operators

Testcases:
No testcase defined.

tsearch2::summary (public)

 tsearch2::summary query txt

Highlights matching terms.

Parameters:
query (required)
txt (required)
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 test_summary summary (test tsearch2-driver) tsearch2::summary tsearch2::summary test_summary->tsearch2::summary db_string db_string (public) tsearch2::summary->db_string tsearch2::build_query tsearch2::build_query (private) tsearch2::summary->tsearch2::build_query AcsSc.ftsenginedriver.summary.tsearch2_driver AcsSc.ftsenginedriver.summary.tsearch2_driver (private) AcsSc.ftsenginedriver.summary.tsearch2_driver->tsearch2::summary

Testcases:
summary

tsearch2::trunc_to_max (private)

 tsearch2::trunc_to_max txt

tsearch has (at least up to PostgreSQL 10) the limitation that the length of tsvector is 1MB. so make sure, we do not raise errors, when this happens. https://www.postgresql.org/docs/current/static/textsearch-limitations.html

Parameters:
txt (required)

Partial Call Graph (max 5 caller/called nodes):
%3 tsearch2::index tsearch2::index (public) tsearch2::trunc_to_max tsearch2::trunc_to_max tsearch2::index->tsearch2::trunc_to_max apm_package_id_from_key apm_package_id_from_key (public) tsearch2::trunc_to_max->apm_package_id_from_key parameter::get parameter::get (public) tsearch2::trunc_to_max->parameter::get

Testcases:
No testcase defined.

tsearch2::unindex (public)

 tsearch2::unindex object_id

Remove item from FTS index

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

Partial Call Graph (max 5 caller/called nodes):
%3 test_index_unindex index_unindex (test tsearch2-driver) tsearch2::unindex tsearch2::unindex test_index_unindex->tsearch2::unindex db_dml db_dml (public) tsearch2::unindex->db_dml AcsSc.ftsenginedriver.unindex.tsearch2_driver AcsSc.ftsenginedriver.unindex.tsearch2_driver (private) AcsSc.ftsenginedriver.unindex.tsearch2_driver->tsearch2::unindex

Testcases:
index_unindex

tsearch2::update_index (public, deprecated)

 tsearch2::update_index [ args... ]
Deprecated. Invoking this procedure generates a warning.

update full text index DEPRECATED: modern SQL supports upsert idioms

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

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

Testcases:
No testcase defined.

tsearch2_driver::valid_operators (private)

 tsearch2_driver::valid_operators
Returns:
list of advanced operator names
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2005-03-06

Partial Call Graph (max 5 caller/called nodes):
%3 tsearch2::separate_query_and_operators tsearch2::separate_query_and_operators (private) tsearch2_driver::valid_operators tsearch2_driver::valid_operators tsearch2::separate_query_and_operators->tsearch2_driver::valid_operators

Testcases:
No testcase defined.
[ show source ]