Public Member Functions

MonographSearchIndex Class Reference

Class to add content to the monograph search index. More...

List of all members.

Public Member Functions

 clearMonographFiles (&$monograph)
 deleteTextIndex ($monographId, $type=null, $assocId=null)
filterKeywords ($text, $allowWildcards=false)
 indexMonographFiles (&$monograph)
 indexMonographMetadata (&$monograph)
 indexObjectKeywords ($objectId, $text, &$position)
loadStopwords ()
 rebuildIndex ($log=false)
 updateFileIndex ($monographId, $type, $fileId)
 updateTextIndex ($monographId, $type, $text, $assocId=null)

Detailed Description

Class to add content to the monograph search index.

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


Member Function Documentation

MonographSearchIndex.clearMonographFiles ( &$  monograph  ) 

Remove indexed file contents for a monograph

Parameters:
$monograph Monograph

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

Referenced by EditorDecisionHandler.saveApproveProof().

MonographSearchIndex.deleteTextIndex ( monographId,
type = null,
assocId = null 
)

Delete keywords from the search index.

Parameters:
$monographId int
$type int optional
$assocId int optional

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

Referenced by MonographDAO.deleteByPressId().

& MonographSearchIndex.filterKeywords ( text,
allowWildcards = false 
)

Split a string into a clean array of keywords

Parameters:
$text string
$allowWildcards boolean
Returns:
array of keywords

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

References loadStopwords().

Referenced by MonographSearch._parseQuery(), and indexObjectKeywords().

MonographSearchIndex.indexMonographFiles ( &$  monograph  ) 

Index all monograph files (galley files).

Parameters:
$monograph Monograph

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

References updateFileIndex().

Referenced by ManageFileApiHandler.deleteFile(), rebuildIndex(), and EditorDecisionHandler.saveApproveProof().

MonographSearchIndex.indexMonographMetadata ( &$  monograph  ) 

Index monograph metadata.

Parameters:
$monograph Monograph

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

References updateTextIndex().

Referenced by SubmissionMetadataViewForm.execute(), CatalogEntrySubmissionReviewForm.execute(), and rebuildIndex().

MonographSearchIndex.indexObjectKeywords ( objectId,
text,
&$  position 
)

Index a block of text for an object.

Parameters:
$objectId int
$text string
$position int

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

References filterKeywords().

Referenced by updateFileIndex(), and updateTextIndex().

& MonographSearchIndex.loadStopwords (  ) 

Return list of stopwords. FIXME Should this be locale-specific?

Returns:
array with stopwords as keys

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

Referenced by filterKeywords().

MonographSearchIndex.rebuildIndex ( log = false  ) 

Rebuild the search index for all presses.

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

References indexMonographFiles(), and indexMonographMetadata().

Referenced by rebuildSearchIndex.execute().

MonographSearchIndex.updateFileIndex ( monographId,
type,
fileId 
)

Add a file to the search index.

Parameters:
$monographId int
$type int
$fileId int

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

References indexObjectKeywords().

Referenced by indexMonographFiles().

MonographSearchIndex.updateTextIndex ( monographId,
type,
text,
assocId = null 
)

Add a block of text to the search index.

Parameters:
$monographId int
$type int
$text string
$assocId int optional

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

References indexObjectKeywords().

Referenced by indexMonographMetadata().


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