- Publicity: Public Only All
search-procs.tcl
full-text search engine
- Location:
- packages/search/tcl/search-procs.tcl
- Author:
- Neophytos Demetriou <k2pts@yahoo.com>
- CVS Identification:
$Id: search-procs.tcl,v 1.55.2.10 2023/03/09 13:39:17 antoniop Exp $
Procedures in this file
- callback::search::action::contract (private)
- callback::search::datasource::contract (private)
- callback::search::driver_info::contract (private)
- callback::search::extra_arg::contract (private)
- callback::search::index::contract (private)
- callback::search::search::contract (private)
- callback::search::summary::contract (private)
- callback::search::unindex::contract (private)
- callback::search::update_index::contract (private)
- callback::search::url::contract (private)
- search::content_filter (private)
- search::content_get (private)
- search::dequeue (public)
- search::dotlrn::get_community_id (public)
- search::driver_name (public)
- search::extra_args (public)
- search::extra_args_names (public)
- search::extra_args_page_contract (public)
- search::indexer (private)
- search::is_guest_p (public, deprecated)
- search::queue (public)
Detailed information
callback::search::action::contract (private)
callback::search::action::contract [ -action action ] \ [ -object_id object_id ] [ -datasource datasource ] \ [ -object_type object_type ]
Do something with a search datasource called by the indexer after having created the datasource.
- Switches:
- -action (optional)
- UPDATE INSERT DELETE
- -object_id (optional)
- -datasource (optional)
- name of the datasource array
- -object_type (optional)
- Returns:
- ignored
- Author:
- Jeff Davis <davis@xarg.net>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::datasource::contract (private)
callback::search::datasource::contract -object_id object_id
This callback is invoked by the search indexer when and object is indexed for search. The datasource implementation name should be the object_type for the object.
- Switches:
- -object_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::driver_info::contract (private)
callback::search::driver_info::contract
This callback returns information about the search engine implementation
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::extra_arg::contract (private)
callback::search::extra_arg::contract [ -value value ] \ [ -object_table_alias object_table_alias ]
Generate a query fragment for search filtering by extra argument. Argument name will be the implementation name called. Search driver should call this for every extra argument and then build the search query using the query fragments returned.
- Switches:
- -value (optional)
- value of the argument
- -object_table_alias (optional)
- SQL alias of table that contains the object_id to join against
- Returns:
- list in array format of {from_clause {} where_clause {}}
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::index::contract (private)
callback::search::index::contract [ -object_id object_id ] \ [ -content content ] [ -title title ] [ -keywords keywords ] \ [ -community_id community_id ] [ -relevant_date relevant_date ] \ [ -description description ] [ -datasource datasource ] \ [ -package_id package_id ]
This callback is invoked from the search::indexer scheduled procedure to add an item to the index
- Switches:
- -object_id (optional)
- -content (optional)
- -title (optional)
- -keywords (optional)
- -community_id (optional)
- -relevant_date (optional)
- -description (optional)
- -datasource (optional)
- -package_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::search::contract (private)
callback::search::search::contract -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 ]
This callback is invoked when a search is to be performed. Query will be a list of lists. The first list is required and will be a list of search terms to send to the full text search engine. Additional optional lists will be a two element list. The first element will be the name of an advanced search operator. The second element will be a list of data to restrict search results based on that operator.
- Switches:
- -query (required)
- -user_id (optional)
- -offset (optional, defaults to
"0"
)- -limit (optional, defaults to
"10"
)- -df (optional)
- -dt (optional)
- -package_ids (optional)
- -object_type (optional)
- -extra_args (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::summary::contract (private)
callback::search::summary::contract [ -query query ] [ -text text ]
This callback is invoked to return an HTML fragment highlighting the terms in query
- Switches:
- -query (optional)
- -text (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::unindex::contract (private)
callback::search::unindex::contract -object_id object_id
This callback is invoked to remove an item from the search index.
- Switches:
- -object_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::update_index::contract (private)
callback::search::update_index::contract [ -object_id object_id ] \ [ -content content ] [ -title title ] [ -keywords keywords ] \ [ -community_id community_id ] [ -relevant_date relevant_date ] \ [ -description description ] [ -datasource datasource ] \ [ -package_id package_id ]
This callback is invoked from the search::indexer scheduled procedure to update an item already in the index
- Switches:
- -object_id (optional)
- -content (optional)
- -title (optional)
- -keywords (optional)
- -community_id (optional)
- -relevant_date (optional)
- -description (optional)
- -datasource (optional)
- -package_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
callback::search::url::contract (private)
callback::search::url::contract -object_id object_id
This callback is invoked when a URL needs to be generated for an object. Usually, this is called from /o.vuh which defers URL calculation until a link is actually clicked, so generating a list of URLs for various object types is quick.
- Switches:
- -object_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::content_filter (private)
search::content_filter [ -passing_style passing_style ] _txt _data \ mime
- Switches:
- -passing_style (optional, defaults to
"string"
)- Parameters:
- _txt (required)
- _data (required)
- mime (required)
- Author:
- Neophytos Demetriou
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::content_get (private)
search::content_get _txt content mime storage_type object_id
- Parameters:
- _txt (required)
- content (required)
- holds the filename if storage_type=file holds the text data if storage_type=text holds the lob_id if storage_type=lob
- mime (required)
- storage_type (required)
- object_id (required)
- Author:
- Neophytos Demetriou
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::dequeue (public)
search::dequeue [ -object_id object_id ] [ -event_date event_date ] \ [ -event event ]
Remove an object from the search queue
- Switches:
- -object_id (optional)
- acs_objects object_id
- -event_date (optional)
- the event date as retrieved from the DB (and which should not be changed)
- -event (optional)
- INSERT or UPDATE or DELETE
- Author:
- Jeff Davis <davis@xarg.net>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::dotlrn::get_community_id (public)
search::dotlrn::get_community_id -package_id package_id
If dotlrn is installed find the package's community_id
- Switches:
- -package_id (required)
- Package to find community
- Returns:
- dotLRN community_id. Empty string if package_id is not under a dotlrn package instance
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::driver_name (public)
search::driver_name
Return the name of the current search driver.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::extra_args (public)
search::extra_args
List of extra_args to pass to search::search callback
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::extra_args_names (public)
search::extra_args_names
List of names of extra args implemented
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::extra_args_page_contract (public)
search::extra_args_page_contract
Generate ad_page_contract fragment for extra_args options Get all the callback impls for extra_args and add a page contract declaration
- Returns:
- string containing the ad_page_contract query declarations for the extra_args that are implemented
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::indexer (private)
search::indexer
Search indexer loops over the existing entries in the search_observer_queue table and calls the appropriate driver functions to index, update, or delete the entry.
- Authors:
- Neophytos Demetriou
- Jeff Davis <davis@xarg.net>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::is_guest_p (public, deprecated)
search::is_guest_p
Deprecated. Invoking this procedure generates a warning.
Checks whether the logged-in user is a guest Deprecated: returning 0 since more than 10 years...
- See Also:
- acs::dc proc "call dotlrn_privacy guest_p"
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
search::queue (public)
search::queue [ -object_id object_id ] [ -event event ]
Add an object to the search_observer_queue table with an event. You should exercise care that the entry is not being created from a trigger (although search is robust for multiple entries so it will not insert or update the same object more than once per sweep).
- Switches:
- -object_id (optional)
- acs_objects object_id
- -event (optional)
- INSERT or UPDATE or DELETE
- Author:
- Jeff Davis <davis@xarg.net>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.