Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
LuceneHandler Class Reference
Inheritance diagram for LuceneHandler:
Handler PKPHandler

Public Member Functions

_getLucenePlugin ()
 
 LuceneHandler (&$request)
 
 pullChangedArticles ($args, &$request)
 
 pullIndexingCallback ($articleXml, $batchCount, $numDeleted)
 
 queryAutocomplete ($args, &$request)
 
 similarDocuments ($args, &$request)
 
- Public Member Functions inherited from PKPHandler
 addCheck (&$handlerValidator)
 
 addPolicy (&$authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 authorize (&$request, &$args, $roleAssignments)
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getLoginExemptions ()
 
getRangeInfo ($rangeName, $contextData=null)
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 hashPageContext ($contextData=array())
 
 index ()
 
 initialize (&$request, $args=null)
 
 PKPHandler ()
 
 requireSSL ()
 
 setDispatcher (&$dispatcher)
 
 setId ($id)
 
 validate ($requiredContexts=null, $request=null)
 

Detailed Description

Handle lucene AJAX and XML requests (auto-completion, pull indexation, etc.)

Definition at line 21 of file LuceneHandler.inc.php.

Member Function Documentation

& LuceneHandler::_getLucenePlugin ( )

Get the lucene plugin object

Returns
LucenePlugin

Definition at line 204 of file LuceneHandler.inc.php.

References PluginRegistry\getPlugin().

Referenced by pullChangedArticles(), queryAutocomplete(), and similarDocuments().

LuceneHandler::LuceneHandler ( $request)

Constructor

Parameters
$requestRequest

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

References PKPHandler\addCheck().

LuceneHandler::pullChangedArticles (   $args,
$request 
)

If pull-indexing is enabled then this handler returns article metadata in a formate that can be consumed by the Solr data import handler.

Parameters
$argsarray
$requestRequest
Returns
JSON string

Definition at line 98 of file LuceneHandler.inc.php.

References _getLucenePlugin(), and PKPHandler\validate().

LuceneHandler::pullIndexingCallback (   $articleXml,
  $batchCount,
  $numDeleted 
)

Return XML with index changes to the Solr server where it will be stored for later processing.

Parameters
$articleXmlstring The XML with index changes to be transferred to the Solr server.
$batchCountinteger The number of articles in the XML list (i.e. the expected number of documents to be indexed).
$numDeletedinteger The number of articles in the XML list that are marked for deletion.
Returns
integer The number of articles processed.

Definition at line 180 of file LuceneHandler.inc.php.

LuceneHandler::queryAutocomplete (   $args,
$request 
)

AJAX request for search query auto-completion.

Parameters
$argsarray
$requestRequest
Returns
JSON string

Definition at line 44 of file LuceneHandler.inc.php.

References _getLucenePlugin(), ArticleSearch\getKeywordsFromSearchFilters(), ArticleSearch\getSearchFilters(), and PKPHandler\validate().

LuceneHandler::similarDocuments (   $args,
$request 
)

If the "similar documents" feature is enabled then this handler redirects to a search query that shows documents similar to the one identified by an article id in the request.

Parameters
$argsarray
$requestRequest

Definition at line 130 of file LuceneHandler.inc.php.

References _getLucenePlugin(), and PKPHandler\validate().


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