Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
ArticleSearchDAO Class Reference
Inheritance diagram for ArticleSearchDAO:
DAO

Public Member Functions

 _insertKeyword ($keyword)
 
 clearIndex ()
 
 deleteArticleKeywords ($articleId, $type=null, $assocId=null)
 
getPhraseResults (&$journal, $phrase, $publishedFrom=null, $publishedTo=null, $type=null, $limit=500, $cacheHours=24)
 
 insertObject ($articleId, $type, $assocId)
 
 insertObjectKeyword ($objectId, $keyword, $position)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

DAO class for article search index.

See Also
ArticleSearch

Definition at line 19 of file ArticleSearchDAO.inc.php.

Member Function Documentation

ArticleSearchDAO::_insertKeyword (   $keyword)

Add a word to the keyword list (if it doesn't already exist).

Parameters
$keywordstring
Returns
int the keyword ID

Definition at line 25 of file ArticleSearchDAO.inc.php.

References DAO\getInsertId(), DAO\retrieve(), and DAO\update().

Referenced by insertObjectKeyword().

ArticleSearchDAO::clearIndex ( )

Clear the search index.

Definition at line 210 of file ArticleSearchDAO.inc.php.

References DAO\getDataSource(), Config\getVar(), DAO\setCacheDir(), and DAO\update().

ArticleSearchDAO::deleteArticleKeywords (   $articleId,
  $type = null,
  $assocId = null 
)

Delete all keywords for an article object.

Parameters
$articleIdint
$typeint optional
$assocIdint optional

Definition at line 133 of file ArticleSearchDAO.inc.php.

References DAO\retrieve(), and DAO\update().

& ArticleSearchDAO::getPhraseResults ( $journal,
  $phrase,
  $publishedFrom = null,
  $publishedTo = null,
  $type = null,
  $limit = 500,
  $cacheHours = 24 
)

Retrieve the top results for a phrases with the given limit (default 500 results).

Parameters
$keywordIdint
Returns
array of results (associative arrays)

Definition at line 62 of file ArticleSearchDAO.inc.php.

References DAO\datetimeToDB(), and DAO\retrieveCached().

ArticleSearchDAO::insertObject (   $articleId,
  $type,
  $assocId 
)

Add an article object to the index (if already exists, indexed keywords are cleared).

Parameters
$articleIdint
$typeint
$assocIdint
Returns
int the object ID

Definition at line 165 of file ArticleSearchDAO.inc.php.

References DAO\getInsertId(), DAO\retrieve(), and DAO\update().

ArticleSearchDAO::insertObjectKeyword (   $objectId,
  $keyword,
  $position 
)

Index an occurrence of a keyword in an object.s

Parameters
$objectIdint
$keywordstring
$positionint
Returns
$keywordId

Definition at line 197 of file ArticleSearchDAO.inc.php.

References _insertKeyword(), and DAO\update().


The documentation for this class was generated from the following file: