[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.search.php (sommaire)

(pas de description)

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

Définit 1 class

Search:: (13 méthodes):
  Search()
  index()
  clean_string()
  balance_string()
  explode_in_words()
  save_words()
  db_save_words()
  remove_from_index()
  clean_index()
  create_search_query_string()
  get_indexed_resources_stats()
  action()
  parseQueryString()


Classe: Search  - X-Ref

Search(&$db, $websiteId='')   X-Ref
Pas de description

index($string, $id, $type = 'html')   X-Ref
Pas de description

clean_string($string)   X-Ref
Pas de description

balance_string($string)   X-Ref
Balance HTML string.

Balance an HTML string by identification of words in headlines. Return a
string with more occurences of the important words.

param: string String to balance
return: string Balanced string

explode_in_words($string, $remove=true)   X-Ref
Explode in words.

Explode in words a strings and give the number of occurence
of each word.

param: string String to be exploded
param: bool Remove the small words and numerical only (true)
return: array Associative array, key: word, value: occurence

save_words($id, $words)   X-Ref
Save the indexed resource.

param: string Resource id
param: array Words and occurences
return: bool Success

db_save_words($id, $words)   X-Ref
Add the words to the word table. The words are supposed to be clean.
Update the occurence table

param: string Resource id
param: array words
return: bool Success

remove_from_index($id)   X-Ref
Remove a resource from the index.

param: string Resource id
return: bool Succes

clean_index()   X-Ref
Clean index.

Clean the index of the words that are not used anymore.
This a SQL intensive function.

return: int Number of word removed or false

create_search_query_string($query)   X-Ref
Return the basic SQL query with place holders to generate
the complete search query.

param: string Query string sent by the user
return: string SQL basic query string

get_indexed_resources_stats($website='')   X-Ref
Get the list of resources in a website with the last indexation time.

param: string Website to look for, if no set, all
return: mixed RecordSet or false if errors

action($query)   X-Ref
Action to display a category.

param: string Server query string
return: int Success code

parseQueryString($query)   X-Ref
Parse query string.

param: string Query string
return: string Clean query string



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics