[ Index ]
 

Code source de Drupal 5.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

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

(pas de description)

Poids: 1287 lignes (47 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 38 fonctions

  search_help()
  search_perm()
  search_block()
  search_menu()
  search_admin_settings_validate()
  search_admin_settings()
  search_wipe_confirm()
  search_wipe_confirm_submit()
  search_wipe()
  search_dirty()
  search_cron()
  search_update_totals()
  search_simplify()
  search_expand_cjk()
  search_index_split()
  _search_index_truncate()
  search_preprocess()
  search_index()
  search_query_extract()
  search_query_insert()
  search_parse_query()
  _search_parse_query()
  do_search()
  search_get_keys()
  search_view()
  search_form()
  search_form_validate()
  search_form_submit()
  search_box()
  search_box_form_submit()
  theme_search_theme_form()
  theme_search_block_form()
  search_data()
  search_excerpt()
  _search_excerpt_replace()
  theme_search_item()
  theme_search_page()
  search_forms()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

search_help($section)   X-Ref
Implementation of hook_help().


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


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


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


search_admin_settings_validate($form_id, $form_values)   X-Ref
Validate callback.


search_admin_settings()   X-Ref
Menu callback; displays the search module settings page.


search_wipe_confirm()   X-Ref
Menu callback: confirm wiping of the index.


search_wipe_confirm_submit($form_id, &$form)   X-Ref
Handler for wipe confirmation


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_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_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 a query that matches the dataset bodies.

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


do_search($keywords, $type, $join1 = '', $where1 = '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()).

Two queries are performed which can be extended by the caller.

The first query selects a set of possible matches based on the search index
and any extra given restrictions. This is the classic "OR" search.

SELECT i.type, i.sid, SUM(i.score*t.count) AS relevance
FROM {search_index} i
INNER JOIN {search_total} t ON i.word = t.word
$join1
WHERE $where1 AND (...)
GROUP BY i.type, i.sid

The second query further refines this set by verifying advanced text
conditions (such as AND, negative or phrase matches), and orders the results
on a the column or expression 'score':

SELECT i.type, i.sid, $select2
FROM temp_search_sids i
INNER JOIN {search_dataset} d ON i.sid = d.sid AND i.type = d.type
$join2
WHERE (...)
ORDER BY score DESC

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

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


search_view()   X-Ref
Menu callback; presents the search form and/or search results.


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

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

search_form_validate($form_id, $form_values, $form)   X-Ref
As the search form collates keys from other modules hooked in via
hook_form_alter, the validation takes place in _submit.
search_form_validate() is used solely to set the 'processed_keys' form
value for the basic search form.


search_form_submit($form_id, $form_values)   X-Ref
Process a search form submission.


search_box($form_id)   X-Ref
Output a search form for the search block and the theme's search box.


search_box_form_submit($form_id, $form_values)   X-Ref
Process a block search form submission.


theme_search_theme_form($form)   X-Ref
Theme the theme search form.


theme_search_block_form($form)   X-Ref
Theme the block search 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.


theme_search_item($item, $type)   X-Ref
Format a single result entry of a search query. This function is normally
called by theme_search_page() or hook_search_page().

param: $item
param: $type

theme_search_page($results, $type)   X-Ref
Format the result page of a search query.

Modules may implement hook_search_page() in order to override this default
function to display search results. In that case it is expected they provide
their own themeable functions.

param: $results
param: $type

search_forms()   X-Ref
Pas de description



Généré le : Fri Nov 30 16:20:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics