SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Search

Functions for front-end search indexing

Variables

NameVisibilityDescription
$query_and (static) 
$record_id (static) 
$table (static) 

Functions

NameVisibilityDescription
addWordsIndexprivate (static)Accepts an array of relevant words and adds it into the index chosen with selectIndex()
cleanuppublic (static)Looks for syncronisation errors in the indexes and fixes them
clearIndexpublic (static)Clears the index chosen with selectIndex()
indexHtmlpublic (static)Splits up html, and adds the keywords which are found into the index chosen with selectIndex()
indexTextpublic (static)Splits up text, and adds the keywords which are found into the index chosen with selectIndex()
paginatepublic (static)Return HTML to perform pagination.
querypublic (static)Does a query for a term, against a set of search handlers
queryAndpublic (static)Set the 'query_and' parameter, which defines the handling of search terms
selectIndexpublic (static)Selects the currently active index

private addWordsIndex

unknown Search::addWordsIndex ( array $words [, int $relevancy_multiplier ] );

Accepts an array of relevant words and adds it into the index chosen with selectIndex()
Usually should be run from within a transaction

public cleanup

unknown Search::cleanup ( mixed $reference_table );

Looks for syncronisation errors in the indexes and fixes them

public clearIndex

unknown Search::clearIndex ( );

Clears the index chosen with selectIndex()

public indexHtml

unknown Search::indexHtml ( string $text [, float $relevancy_multiplier ] );

Splits up html, and adds the keywords which are found into the index chosen with selectIndex()
Usually should be run from within a transaction

public indexText

unknown Search::indexText ( string $text [, float $relevancy_multiplier ] );

Splits up text, and adds the keywords which are found into the index chosen with selectIndex()
Usually should be run from within a transaction

public paginate

unknown Search::paginate ( mixed $curr_page , mixed $num_pages [, mixed $div_class ] );

Return HTML to perform pagination.

$curr_page The current page number (1-based).
$num_page The total number of pages.
$div_class If provided, a wrapper div will be generated, with this class name.

public query

array Search::query ( string $query , array $search_handlers [, int $page [, int $num_per_page ]] );

Does a query for a term, against a set of search handlers

public queryAnd

void Search::queryAnd ( mixed $val );

Set the 'query_and' parameter, which defines the handling of search terms

public selectIndex

void Search::selectIndex ( string $table , int $record_id );

Selects the currently active index