Index: openacs-4/packages/intermedia-driver/tcl/intermedia-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/intermedia-driver/tcl/intermedia-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/intermedia-driver/tcl/intermedia-procs.tcl 27 Jan 2006 16:03:57 -0000 1.1 +++ openacs-4/packages/intermedia-driver/tcl/intermedia-procs.tcl 12 Dec 2006 18:18:05 -0000 1.2 @@ -190,115 +190,7 @@ @param object_id } { - - ns_log Notice "DIRK $query the query" # TODO implement intermedia::summary - return [string range $text 0 2000] -} - -ad_proc -public -callback search::driver_info -impl intermedia-driver { -} { - Info for the service contract implementation - for intermedia - - @author Dave Bauer (dave@thedesignexperience.org) - @creation-date 2005-05-29 - -} { - return [list package_key intermedia-driver version 1 automatic_and_queries_p 1 stopwords_p 1] -} - -namespace eval intermedia:: {} -namespace eval intermedia::install:: {} - -ad_proc -public intermedia::install::package_install { -} { - @author Dave Bauer (dave@thedesignexperience.org) - @creation-date 2005-05-29 - - Install APM callback, sets up service contract - implementations - -} { - intermedia::install::register_fts_impl -} - -ad_proc -private intermedia::install::register_fts_impl { -} { - - Register FtsEngineDriver service contract implementation - - @author Dave Bauer (dave@thedesignexperience.org) - @creation-date 2005-05-29 - - @return - - @error -} { - - set spec { - name "intermedia-driver" - aliases { - search intermedia::search - index intermedia::index - unindex intermedia::unindex - update_index intermedia::update_index - summary intermedia::summary - info intermedia::driver_info - } - contract_name "FtsEngineDriver" - owner "search" - } - - acs_sc::impl::new_from_spec -spec $spec - -} - -ad_proc -public intermedia::search { - query - offset - limit - user_id - df - dt -} { - Search full text index - - @author Dave Bauer (dave@thedesignexperience.org) - @creation-date 2005-05-29 - - @param query - @param offset - @param limit - @param user_id - @param df - @param dt -} { - set results_ids [db_list search "select o.object_id from site_wide_index swi, acs_objects o where swi.object_id= o.object_id and contains (swi.indexed_content,:query)> 0 and and rownum > $offset and rownum <= $offset + $limit"] - # TODO implement stopwords reporting for user query - set count [db_string count "select count(swi.object_id) from site_wide_index swi, acs_objects o where o.object_id=swi.object_id and contains (swi.indexed_content,:query)> 0"] - set stop_words "" - ns_log notice " ------------------------------------------------------------------------------ -DAVEB intermedia::search -query = '{$query}' -return = '[list ids $results_ids stopwords $stop_words count $count]' ------------------------------------------------------------------------------ -" - return [list ids $results_ids stopwords $stop_words count $count] -} - -ad_proc -public -callback search::summary -impl intermedia-driver { -} { - Get summary for an object - - @author Dave Bauer (dave@thedesignexperience.org) - @creation-date 2005-05-29 - - @param object_id - -} { - # TODO implement intermedia::summary return [string range $text 0 100] } @@ -312,4 +204,4 @@ } { return [list package_key intermedia-driver version 1 automatic_and_queries_p 1 stopwords_p 1] -} \ No newline at end of file +}