Public Member Functions

PaperSearchIndex Class Reference
[Search]

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

List of all members.

Public Member Functions

 deleteTextIndex ($paperId, $type=null, $assocId=null)
filterKeywords ($text, $allowWildcards=false)
 indexObjectKeywords ($objectId, $text, &$position)
 indexPaperFiles (&$paper)
 indexPaperMetadata (&$paper)
 indexSuppFileMetadata (&$suppFile)
loadStopwords ()
 rebuildIndex ($log=false)
 updateFileIndex ($paperId, $type, $fileId)
 updateTextIndex ($paperId, $type, $text, $assocId=null)

Detailed Description

Class to add content to the paper search index.

See also:
PaperSearch

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


Member Function Documentation

PaperSearchIndex.deleteTextIndex ( paperId,
type = null,
assocId = null 
)

Delete keywords from the search index.

Parameters:
$paperId int
$type int optional
$assocId int optional

Definition at line 93 of file PaperSearchIndex.inc.php.

Referenced by TrackDirectorAction.deleteGalley(), and TrackDirectorAction.deleteSuppFile().

& PaperSearchIndex.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 104 of file PaperSearchIndex.inc.php.

References loadStopwords().

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

PaperSearchIndex.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 PaperSearchIndex.inc.php.

References filterKeywords().

Referenced by updateFileIndex(), and updateTextIndex().

PaperSearchIndex.indexPaperFiles ( &$  paper  ) 

Index all paper files (supplementary and galley).

Parameters:
$paper Paper

Definition at line 220 of file PaperSearchIndex.inc.php.

References indexSuppFileMetadata(), and updateFileIndex().

Referenced by rebuildIndex().

PaperSearchIndex.indexPaperMetadata ( &$  paper  ) 

Index paper metadata.

Parameters:
$paper Paper

Definition at line 155 of file PaperSearchIndex.inc.php.

References updateTextIndex().

Referenced by MetadataForm.execute(), and rebuildIndex().

PaperSearchIndex.indexSuppFileMetadata ( &$  suppFile  ) 

Index supp file metadata.

Parameters:
$suppFile object

Definition at line 198 of file PaperSearchIndex.inc.php.

References updateTextIndex().

Referenced by SuppFileForm.execute(), and indexPaperFiles().

& PaperSearchIndex.loadStopwords (  ) 

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

Returns:
array with stopwords as keys

Definition at line 139 of file PaperSearchIndex.inc.php.

Referenced by filterKeywords().

PaperSearchIndex.rebuildIndex ( log = false  ) 

Rebuild the search index for all conferences.

Definition at line 245 of file PaperSearchIndex.inc.php.

References indexPaperFiles(), and indexPaperMetadata().

Referenced by rebuildSearchIndex.execute(), ImportOCS1.rebuildSearchIndex(), and Upgrade.rebuildSearchIndex().

PaperSearchIndex.updateFileIndex ( paperId,
type,
fileId 
)

Add a file to the search index.

Parameters:
$paperId int
$type int
$fileId int

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

References indexObjectKeywords().

Referenced by SuppFileForm.execute(), PaperGalleyForm.execute(), ImportOCS1.importPapers(), and indexPaperFiles().

PaperSearchIndex.updateTextIndex ( paperId,
type,
text,
assocId = null 
)

Add a block of text to the search index.

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

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

References indexObjectKeywords().

Referenced by indexPaperMetadata(), and indexSuppFileMetadata().


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