Public Member Functions | Public Attributes

SearchText Class Reference

Search text model: index object texts. More...

Inheritance diagram for SearchText:
BEAppModel AppModel

List of all members.

Public Member Functions

 createSearchText ($model)
 Save search data for a model.
 removeObject ($id)
 Remove index data for object id.
 saveLangTexts (array &$dataLangText)
 Save search data multilang.
 rebuildIndex ($options)
 Rebuild indexes for text search.

Public Attributes

 $belongsTo

Detailed Description

Search text model: index object texts.

Definition at line 26 of file search_text.php.


Member Function Documentation

SearchText::createSearchText ( model  ) 

Save search data for a model.

Parameters:
object $model
Exceptions:
BeditaException 
Returns:
boolean

Definition at line 51 of file search_text.php.

SearchText::rebuildIndex ( options  ) 

Rebuild indexes for text search.

Parameters:
array $options 'returnOnlyFailed' => true (default) return only 'failed' and 'langTextFailed' array false return also 'success' and 'langTextSuccess' array 'delete' => delete index first (default false) 'type' => index object type only (default unset -> all types) 'log' => true to log errors
Returns:
array contains: 'success' => array of objects data successfully indexed. Each item contains: 'id' => object id indexed 'failed' => array of objects data on which rebuild index failed. Each item contains: 'id' => object id, 'error' => message error, 'details' => error detail 'langTextSuccess' => array of translations successfully indexed. Each item contains: 'object_id' => object id on which the translations was done, 'lang' => the translation language 'langTextFailed' => array of translations on which rebuild index failed. Each item contains: 'object_id' => object id on which the translations failed, 'lang' => the translation language, "error" => message error, "detail" => error detail

Definition at line 169 of file search_text.php.

SearchText::removeObject ( id  ) 

Remove index data for object id.

Parameters:
unknown $id

Definition at line 98 of file search_text.php.

SearchText::saveLangTexts ( array &$  dataLangText  ) 

Save search data multilang.

Parameters:
array $dataLangText
Exceptions:
BeditaException 

Definition at line 124 of file search_text.php.


Member Data Documentation

SearchText::$belongsTo
Initial value:
 array(
        'BEObject' =>
            array(
                'fields'        => 'id',
                'foreignKey'    => 'object_id'
            )
    )

Definition at line 34 of file search_text.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus