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):
- 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