Class SolrIndexer
This class sends update requests to a Solr core. If the request failed an exception is thrown. This class allows handling of more than one article at once.
<server>:8080/solr/admin/cores?action=STATUS <server>:8080/solr/admin/cores?action=RENAME&core=collection1&other=contenido <server>:8080/solr/admin/cores?action=RELOAD&core=contenido
Copyright: four for business AG
Author: Marcus Gnaß <marcus.gnass@4fb.de>
Located at plugins/search_solr/classes/class.solr_indexer.php
public static
|
#
handleStoringOfArticle( array $newData, array $oldData )
CEC chain function for updating an article in the Solr core (index). |
public static
|
#
handleStoringOfContentEntry( array $articleIds )
CEC chain function for updating an article in the Solr core (index). |
public
|
#
__construct( array $articleIds )
Create client instance (connect to Apache Solr) and aggregate it. |
public
|
|
private
SolrClient
|
|
public
|
#
addArticles( )
If the current articles are indexable for each article a new index document will be created and filled with its content and eventually be added to the index. |
private
|
|
public
|
#
deleteArticles( )
Delete all CONTENIDO article documents that are aggregated as $this->_articleIds. |
public
|
|
private
boolean
|
|
private
array
|
|
private
|
boolean |
DBG
|
false |
|
string |
ID_PREFIX
|
'contenido_article_' |
#
Prefix to be used for Solr <uniqueKey> in order to distinguish docuemnts from different sources. |
private
array
|
$_solrClients | NULL |
#
of SolrClient |
private
array
|
$_articleIds | array() |
#
IDs of articles to be updated / added / deleted. |