[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/modules/search/ -> search.module (summary)

(no description)

File Size: 1304 lines (46 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 34 functions

  search_help()
  search_theme()
  search_perm()
  search_block()
  search_menu()
  _search_menu()
  search_wipe()
  search_dirty()
  search_cron()
  search_update_totals()
  search_simplify()
  search_expand_cjk()
  search_index_split()
  _search_index_truncate()
  search_invoke_preprocess()
  search_index()
  search_touch_node()
  search_nodeapi()
  search_comment()
  search_query_extract()
  search_query_insert()
  search_parse_query()
  _search_parse_query()
  do_search()
  search_get_keys()
  search_form()
  search_box()
  search_box_form_submit()
  template_preprocess_search_theme_form()
  template_preprocess_search_block_form()
  search_data()
  search_excerpt()
  _search_excerpt_replace()
  search_forms()

Functions
Functions that are not part of a class:

search_help($path, $arg)   X-Ref
Implementation of hook_help().


search_theme()   X-Ref
Implementation of hook_theme()


search_perm()   X-Ref
Implementation of hook_perm().


search_block($op = 'list', $delta = 0)   X-Ref
Implementation of hook_block().


search_menu()   X-Ref
Implementation of hook_menu().


_search_menu($name)   X-Ref
No description

search_wipe($sid = NULL, $type = NULL, $reindex = FALSE)   X-Ref
Wipes a part of or the entire search index.

param: $sid
param: $type

search_dirty($word = NULL)   X-Ref
Marks a word as dirty (or retrieves the list of dirty words). This is used
during indexing (cron). Words which are dirty have outdated total counts in
the search_total table, and need to be recounted.


search_cron()   X-Ref
Implementation of hook_cron().

Fires hook_update_index() in all modules and cleans up dirty words (see
search_dirty).

search_update_totals()   X-Ref
This function is called on shutdown to ensure that search_total is always
up to date (even if cron times out or otherwise fails).


search_simplify($text)   X-Ref
Simplifies a string according to indexing rules.


search_expand_cjk($matches)   X-Ref
Basic CJK tokenizer. Simply splits a string into consecutive, overlapping
sequences of characters ('minimum_word_size' long).


search_index_split($text)   X-Ref
Splits a string into tokens for indexing.


_search_index_truncate(&$text)   X-Ref
Helper function for array_walk in search_index_split.


search_invoke_preprocess(&$text)   X-Ref
Invokes hook_search_preprocess() in modules.


search_index($sid, $type, $text)   X-Ref
Update the full-text search index for a particular item.

param: $sid
param: $type
param: $text

search_touch_node($nid)   X-Ref
Change a node's changed timestamp to 'now' to force reindexing.

param: $nid

search_nodeapi(&$node, $op, $teaser = NULL, $page = NULL)   X-Ref
Implementation of hook_nodeapi().


search_comment($a1, $op)   X-Ref
Implementation of hook_comment().


search_query_extract($keys, $option)   X-Ref
Extract a module-specific search option from a search query. e.g. 'type:book'


search_query_insert($keys, $option, $value = '')   X-Ref
Return a query with the given module-specific search option inserted in.
e.g. 'type:book'.


search_parse_query($text)   X-Ref
Parse a search query into SQL conditions.

We build two queries that matches the dataset bodies. @See do_search for
more about these.

param: $text
return:

_search_parse_query(&$word, &$scores, $not = FALSE)   X-Ref
Helper function for search_parse_query();


do_search($keywords, $type, $join1 = '', $where1 = '1 = 1', $arguments1 = array()   X-Ref
Do a query on the full-text search index for a word or words.

This function is normally only called by each module that support the
indexed search (and thus, implements hook_update_index()).

Results are retrieved in two logical passes. However, the two passes are
joined together into a single query.  And in the case of most simple
queries the second pass is not even used.

The first pass selects a set of all possible matches, which has the benefit
of also providing the exact result set for simple "AND" or "OR" searches.

The second portion of the query further refines this set by verifying
advanced text conditions (such negative or phrase matches)

param: $keywords
param: $type
param: $join1
param: $where1
param: $arguments1
param: $columns2
param: $join2
param: $arguments2
param: $sort_parameters
return:

search_get_keys()   X-Ref
Helper function for grabbing search keys.


search_form(&$form_state, $action = '', $keys = '', $type = NULL, $prompt = NULL)   X-Ref
Render a search form.

param: $action
param: $keys
param: $type
param: $prompt
return:

search_box(&$form_state, $form_id)   X-Ref
Form builder; Output a search form for the search block and the theme's search box.


search_box_form_submit($form, &$form_state)   X-Ref
Process a block search form submission.


template_preprocess_search_theme_form(&$variables)   X-Ref
Process variables for search-theme-form.tpl.php.

The $variables array contains the following arguments:
- $form


template_preprocess_search_block_form(&$variables)   X-Ref
Process variables for search-block-form.tpl.php.

The $variables array contains the following arguments:
- $form


search_data($keys = NULL, $type = 'node')   X-Ref
Perform a standard search on the given keys, and return the formatted results.


search_excerpt($keys, $text)   X-Ref
Returns snippets from a piece of text, with certain keywords highlighted.
Used for formatting search results.

param: $keys
param: $text
return:

_search_excerpt_replace(&$text)   X-Ref
Helper function for array_walk in search_except.


search_forms()   X-Ref
No description



Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7