ArticleSearchIndex Class Reference
[Search]

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

List of all members.

Public Member Functions

 deleteTextIndex ($articleId, $type=null, $assocId=null)
filterKeywords ($text, $allowWildcards=false)
 indexArticleFiles (&$article)
 indexArticleMetadata (&$article)
 indexObjectKeywords ($objectId, $text, &$position)
 indexSuppFileMetadata (&$suppFile)
loadStopwords ()
 rebuildIndex ($log=false)
 updateFileIndex ($articleId, $type, $fileId)
 updateTextIndex ($articleId, $type, $text, $assocId=null)


Detailed Description

Class to add content to the article search index.

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


Member Function Documentation

ArticleSearchIndex.deleteTextIndex ( articleId,
type = null,
assocId = null 
)

Delete keywords from the search index.

Parameters:
$articleId int
$type int optional
$assocId int optional

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

References DAORegistry.getDAO().

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

& ArticleSearchIndex.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 ArticleSearchIndex.inc.php.

References Core.cleanVar(), Config.getVar(), loadStopwords(), String.regexp_replace(), String.regexp_split(), String.strlen(), String.strtolower(), and String.substr().

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

ArticleSearchIndex.indexArticleFiles ( &$  article  ) 

Index all article files (supplementary and galley).

Parameters:
$article Article

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

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

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

ArticleSearchIndex.indexArticleMetadata ( &$  article  ) 

Index article metadata.

Parameters:
$article Article

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

References updateTextIndex().

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

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

Index a block of text for an object.

Parameters:
$objectId int
$text string
$position int

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

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

Referenced by updateFileIndex(), and updateTextIndex().

ArticleSearchIndex.indexSuppFileMetadata ( &$  suppFile  ) 

Index supp file metadata.

Parameters:
$suppFile object

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

References updateTextIndex().

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

& ArticleSearchIndex.loadStopwords (  ) 

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

Returns:
array with stopwords as keys

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

Referenced by filterKeywords().

ArticleSearchIndex.rebuildIndex ( log = false  ) 

ArticleSearchIndex.updateFileIndex ( articleId,
type,
fileId 
)

Add a file to the search index.

Parameters:
$articleId int
$type int
$fileId int

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

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

Referenced by SuppFileForm.execute(), ArticleGalleyForm.execute(), and indexArticleFiles().

ArticleSearchIndex.updateTextIndex ( articleId,
type,
text,
assocId = null 
)

Add a block of text to the search index.

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

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

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

Referenced by indexArticleMetadata(), and indexSuppFileMetadata().


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

Generated on Mon Jul 14 10:55:39 2008 for Open Journal Systems by  doxygen 1.5.6