Open Journal Systems  3.3.0
ArticleSearchIndex Class Reference
Inheritance diagram for ArticleSearchIndex:
SubmissionSearchIndex

Public Member Functions

 articleChangesFinished ()
 
 articleDeleted ($articleId)
 
 articleMetadataChanged ($article)
 
 clearSubmissionFiles ($submission)
 
 deleteTextIndex ($articleId, $type=null, $assocId=null)
 
 rebuildIndex ($log=false, $journal=null, $switches=array())
 
 submissionChangesFinished ()
 
 submissionFileChanged ($articleId, $type, $fileId)
 
 submissionFileDeleted ($articleId, $type=null, $assocId=null)
 
 submissionFilesChanged ($article)
 
 submissionMetadataChanged ($submission)
 
- Public Member Functions inherited from SubmissionSearchIndex
 filterKeywords ($text, $allowWildcards=false)
 

Protected Member Functions

 _indexObjectKeywords ($objectId, $text, &$position)
 
 _updateTextIndex ($articleId, $type, $text, $assocId=null)
 
- Protected Member Functions inherited from SubmissionSearchIndex
 _loadStopwords ()
 

Detailed Description

Class to maintain the article search index.

Definition at line 18 of file ArticleSearchIndex.inc.php.

Member Function Documentation

◆ _indexObjectKeywords()

ArticleSearchIndex::_indexObjectKeywords (   $objectId,
  $text,
$position 
)
protected

Index a block of text for an object.

Parameters
$objectIdint
$textstring
$positionint

Definition at line 305 of file ArticleSearchIndex.inc.php.

References SubmissionSearchIndex\filterKeywords(), and DAORegistry\getDAO().

Referenced by _updateTextIndex(), and submissionFileChanged().

◆ _updateTextIndex()

ArticleSearchIndex::_updateTextIndex (   $articleId,
  $type,
  $text,
  $assocId = null 
)
protected

Add a block of text to the search index.

Parameters
$articleIdint
$typeint
$textstring
$assocIdint optional

Definition at line 322 of file ArticleSearchIndex.inc.php.

References _indexObjectKeywords(), and DAORegistry\getDAO().

Referenced by submissionMetadataChanged().

◆ articleChangesFinished()

ArticleSearchIndex::articleChangesFinished ( )

Let the indexing back-end know that the current transaction finished so that the index can be batch-updated.

Definition at line 232 of file ArticleSearchIndex.inc.php.

References Config\getVar(), and submissionChangesFinished().

◆ articleDeleted()

ArticleSearchIndex::articleDeleted (   $articleId)

Signal to the indexing back-end that the metadata of a supplementary file changed.

See also
ArticleSearchIndex::submissionMetadataChanged() above for more comments.
Parameters
$articleIdinteger

Definition at line 203 of file ArticleSearchIndex.inc.php.

References HookRegistry\call().

◆ articleMetadataChanged()

ArticleSearchIndex::articleMetadataChanged (   $article)

Signal to the indexing back-end that the metadata of a submission changed.

Push indexing implementations will try to immediately update the index to reflect the changes. Pull implementations will mark articles as "changed" and let the indexing back-end decide the best point in time to actually index the changed data.

Parameters
$submissionSubmission

Definition at line 65 of file ArticleSearchIndex.inc.php.

References Config\getVar(), and submissionMetadataChanged().

◆ clearSubmissionFiles()

ArticleSearchIndex::clearSubmissionFiles (   $submission)

Remove indexed file contents for a submission

Parameters
$submissionSubmission

Reimplemented from SubmissionSearchIndex.

Definition at line 124 of file ArticleSearchIndex.inc.php.

References DAORegistry\getDAO().

◆ deleteTextIndex()

ArticleSearchIndex::deleteTextIndex (   $articleId,
  $type = null,
  $assocId = null 
)

Delete keywords from the search index.

Parameters
$articleIdint
$typeint optional
$assocIdint optional

Definition at line 76 of file ArticleSearchIndex.inc.php.

References DAORegistry\getDAO().

◆ rebuildIndex()

ArticleSearchIndex::rebuildIndex (   $log = false,
  $journal = null,
  $switches = array() 
)

Rebuild the search index for one or all journals.

Parameters
$logboolean Whether to display status information to stdout.
$journalJournal If given the user wishes to re-index only one journal. Not all search implementations may be able to do so. Most notably: The default SQL implementation does not support journal-specific re-indexing as index data is not partitioned by journal.
$switchesarray Optional index administration switches.

Definition at line 248 of file ArticleSearchIndex.inc.php.

References HookRegistry\call(), PKPServices\get(), DAORegistry\getDAO(), AppLocale\requireComponents(), submissionChangesFinished(), submissionFilesChanged(), and submissionMetadataChanged().

◆ submissionChangesFinished()

ArticleSearchIndex::submissionChangesFinished ( )

Let the indexing back-end know that the current transaction finished so that the index can be batch-updated.

Reimplemented from SubmissionSearchIndex.

Definition at line 218 of file ArticleSearchIndex.inc.php.

References HookRegistry\call().

Referenced by articleChangesFinished(), and rebuildIndex().

◆ submissionFileChanged()

ArticleSearchIndex::submissionFileChanged (   $articleId,
  $type,
  $fileId 
)

Signal to the indexing back-end that an article file changed.

See also
ArticleSearchIndex::submissionMetadataChanged() above for more comments.
Parameters
$articleIdint
$typeint
$fileIdint

Definition at line 91 of file ArticleSearchIndex.inc.php.

References _indexObjectKeywords(), HookRegistry\call(), SearchFileParser\fromFile(), and DAORegistry\getDAO().

Referenced by submissionFilesChanged().

◆ submissionFileDeleted()

ArticleSearchIndex::submissionFileDeleted (   $articleId,
  $type = null,
  $assocId = null 
)

Signal to the indexing back-end that a file was deleted.

See also
ArticleSearchIndex::submissionMetadataChanged() above for more comments.
Parameters
$articleIdint
$typeint optional
$assocIdint optional

Definition at line 179 of file ArticleSearchIndex.inc.php.

References HookRegistry\call(), and DAORegistry\getDAO().

◆ submissionFilesChanged()

ArticleSearchIndex::submissionFilesChanged (   $article)

Signal to the indexing back-end that all files (supplementary and galley) assigned to an article changed and must be re-indexed.

See also
ArticleSearchIndex::submissionMetadataChanged() above for more comments.
Parameters
$articleArticle

Definition at line 138 of file ArticleSearchIndex.inc.php.

References HookRegistry\call(), DAORegistry\getDAO(), and submissionFileChanged().

Referenced by rebuildIndex().

◆ submissionMetadataChanged()

ArticleSearchIndex::submissionMetadataChanged (   $submission)

Signal to the indexing back-end that the metadata of a submission changed.

Push indexing implementations will try to immediately update the index to reflect the changes. Pull implementations will mark articles as "changed" and let the indexing back-end decide the best point in time to actually index the changed data.

Parameters
$submissionSubmission

Reimplemented from SubmissionSearchIndex.

Definition at line 23 of file ArticleSearchIndex.inc.php.

References _updateTextIndex(), and HookRegistry\call().

Referenced by articleMetadataChanged(), and rebuildIndex().


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