tsearch2::index (public)

 tsearch2::index object_id txt title keywords

Defined in packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl

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
Source code:
    set txt [tsearch2::trunc_to_max $txt]
    db_dml index {}
XQL Not present:
Generic, Oracle
PostgreSQL XQL file:
<fullquery name="tsearch2::index.index">
    <querytext>
      with index as (
       select setweight(to_tsvector(coalesce(:title,'')),'A')
            ||setweight(to_tsvector(coalesce(:keywords,'')),'B')
            ||to_tsvector(coalesce(:txt,'')) as fti
       from dual
      ),
      insert as (
      insert into txt (object_id, fti)
        select o.object_id, i.fti
          from acs_objects o, index i
         where object_id = :object_id
           and not exists (select 1 from txt
                            where object_id = o.object_id)
      )
      update txt set
        fti = (select fti from index)
       where object_id = :object_id
    </querytext>
</fullquery>
packages/tsearch2-driver/tcl/tsearch2-driver-procs-postgresql.xql

[ hide source ] | [ make this the default ]
Show another procedure: