Open Monograph Press  3.3.0
MonographSearchIndex Class Reference
Inheritance diagram for MonographSearchIndex:
SubmissionSearchIndex

Public Member Functions

 clearSubmissionFiles ($submission)
 
 deleteTextIndex ($monographId, $type=null, $assocId=null)
 
 indexObjectKeywords ($objectId, $text, &$position)
 
 monographChangesFinished ()
 
 rebuildIndex ($log=false)
 
 submissionChangesFinished ()
 
 submissionFilesChanged ($monograph)
 
 submissionMetadataChanged ($submission)
 
 updateFileIndex ($monographId, $type, $fileId)
 
 updateTextIndex ($monographId, $type, $text, $assocId=null)
 
- Public Member Functions inherited from SubmissionSearchIndex
 filterKeywords ($text, $allowWildcards=false)
 

Additional Inherited Members

- Protected Member Functions inherited from SubmissionSearchIndex
 _loadStopwords ()
 

Detailed Description

Class to add content to the monograph search index.

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

Member Function Documentation

◆ clearSubmissionFiles()

MonographSearchIndex::clearSubmissionFiles (   $submission)

Remove indexed file contents for a submission

Parameters
$submissionSubmission

Reimplemented from SubmissionSearchIndex.

Definition at line 144 of file MonographSearchIndex.inc.php.

References DAORegistry\getDAO().

◆ deleteTextIndex()

MonographSearchIndex::deleteTextIndex (   $monographId,
  $type = null,
  $assocId = null 
)

Delete keywords from the search index.

Parameters
$monographIdint
$typeint optional
$assocIdint optional

Definition at line 86 of file MonographSearchIndex.inc.php.

References DAORegistry\getDAO().

◆ indexObjectKeywords()

MonographSearchIndex::indexObjectKeywords (   $objectId,
  $text,
$position 
)

Index a block of text for an object.

Parameters
$objectIdint
$textstring
$positionint

Definition at line 26 of file MonographSearchIndex.inc.php.

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

Referenced by updateFileIndex(), and updateTextIndex().

◆ monographChangesFinished()

MonographSearchIndex::monographChangesFinished ( )

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

Definition at line 166 of file MonographSearchIndex.inc.php.

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

◆ rebuildIndex()

MonographSearchIndex::rebuildIndex (   $log = false)

Rebuild the search index for all presses.

Parameters
$logboolean Whether or not to log progress to the console.

Definition at line 176 of file MonographSearchIndex.inc.php.

References DAORegistry\getDAO(), Config\getVar(), submissionChangesFinished(), submissionFilesChanged(), and submissionMetadataChanged().

◆ submissionChangesFinished()

MonographSearchIndex::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 152 of file MonographSearchIndex.inc.php.

References HookRegistry\call().

Referenced by monographChangesFinished(), and rebuildIndex().

◆ submissionFilesChanged()

MonographSearchIndex::submissionFilesChanged (   $monograph)

Index all monograph files (galley files).

Parameters
$monographMonograph

Definition at line 127 of file MonographSearchIndex.inc.php.

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

Referenced by rebuildIndex().

◆ submissionMetadataChanged()

MonographSearchIndex::submissionMetadataChanged (   $submission)

Index monograph metadata.

Parameters
Submission$submission

Reimplemented from SubmissionSearchIndex.

Definition at line 95 of file MonographSearchIndex.inc.php.

References updateTextIndex().

Referenced by rebuildIndex().

◆ updateFileIndex()

MonographSearchIndex::updateFileIndex (   $monographId,
  $type,
  $fileId 
)

Add a file to the search index.

Parameters
$monographIdint
$typeint
$fileIdint

Definition at line 56 of file MonographSearchIndex.inc.php.

References SearchFileParser\fromFile(), DAORegistry\getDAO(), and indexObjectKeywords().

Referenced by submissionFilesChanged().

◆ updateTextIndex()

MonographSearchIndex::updateTextIndex (   $monographId,
  $type,
  $text,
  $assocId = null 
)

Add a block of text to the search index.

Parameters
$monographIdint
$typeint
$textstring
$assocIdint optional

Definition at line 43 of file MonographSearchIndex.inc.php.

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

Referenced by submissionMetadataChanged().


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