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

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

Detailed Description

DAO class for article search index.

See Also

Definition at line 19 of file

Member Function Documentation

ArticleSearchDAO::_insertKeyword (   $keyword)

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

int the keyword ID

Definition at line 25 of file

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

Referenced by insertObjectKeyword().

ArticleSearchDAO::clearIndex ( )

Clear the search index.

Definition at line 211 of file

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

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

Delete all keywords for an article object.

$typeint optional
$assocIdint optional

Definition at line 134 of file

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

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

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

array of results (associative arrays)

Definition at line 62 of file

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

ArticleSearchDAO::insertObject (   $articleId,

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

int the object ID

Definition at line 166 of file

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

ArticleSearchDAO::insertObjectKeyword (   $objectId,

Index an occurrence of a keyword in an object.s


Definition at line 198 of file

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

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