Class SolrContentIndexer
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.content.indexing.solr.SolrContentIndexer
- All Implemented Interfaces:
SolrFieldNames,LogEnabled,Component,Serviceable
public class SolrContentIndexer
extends AbstractLogEnabled
implements Component, Serviceable, SolrFieldNames
Component for
Content indexing into a Solr server.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdditionalDataIndexerExtensionPointThe additional property indexer extension point.protected ContentHelperThe content helperThe extension point for ContentVisibleAttachmentIndexersprotected SolrResourceIndexerThe resource indexerprotected SystemPropertyExtensionPointThe system property extension point.static final StringThe component role.Fields inherited from interface org.ametys.cms.content.indexing.solr.SolrFieldNames
ACL_INIT_VALUE_ALLOWED_GROUPS, ACL_INIT_VALUE_ALLOWED_USERS, ACL_INIT_VALUE_ANONYMOUS, ACL_INIT_VALUE_ANYCONNECTED, ACL_INIT_VALUE_DENIED_GROUPS, ACL_INIT_VALUE_DENIED_USERS, ATTACHMENT_CONTENT_ID, CONTENT_COMMENTS_NONVALIDATED, CONTENT_COMMENTS_VALIDATED, CONTENT_LANGUAGES, CONTENT_NAME, CONTENT_OUTGOING_REFEERENCES_RESOURCE_IDS, CONTENT_TITLES, CONTENT_TYPE_RESOURCE, CONTENT_VISIBLE_ATTACHMENT_RESOURCE_IDS, DATE_FOR_SORTING, DATES_FACET, DC_CONTRIBUTOR, DC_COVERAGE, DC_CREATOR, DC_DATE, DC_DESCRIPTION, DC_FORMAT, DC_IDENTIFIER, DC_LANGUAGE, DC_PUBLISHER, DC_RELATION, DC_RIGHTS, DC_SOURCE, DC_SUBJECT, DC_TITLE, DC_TYPE, DOCUMENT_TYPE, EXACT_WS_OPERATOR, EXCERPT, FILENAME, FULL, ID, ID_DV, IS_AMETYS_OBJECT, LANGUAGE_SEPARATOR, LENGTH, MIME_TYPES, PATH, PSEUDO_CONTENT_TYPE_VALUE_RESOURCE, PSEUDO_CONTENT_TYPES, REPEATER_ENTRY_POSITION, RESOURCE_ANCESTOR_AND_SELF_IDS, RESOURCE_ANCESTOR_IDS, RESOURCE_CREATOR, RESOURCE_DATE, RESOURCE_LAST_MODIFIED, RESOURCE_MIME_TYPE_GROUP, RESOURCE_ROOT_ID, SIMPLE_CONTENT_PARENTS, STEMMED_OPERATOR, SYSTEM_FULL, TITLE, TITLE_SORT, TYPE_CONTENT, TYPE_CONTENT_ATTACHMENT_RESOURCE, TYPE_CONTENT_ATTRIBUTE_RESOURCE, TYPE_REPEATER, TYPE_RESOURCE, TYPE_TRASH_ELEMENT, TYPE_WF_ENTRY, TYPE_WF_STEP, WORKFLOW_CURRENT_STEPS, WORKFLOW_CURRENT_STEPS_DV, WORKFLOW_ENTRY_STATE, WORKFLOW_HISTORY_STEPS, WORKFLOW_HISTORY_STEPS_DV, WORKFLOW_NAME, WORKFLOW_REF, WORKFLOW_REF_DV, WORKFLOW_STEP_ACTIONID, WORKFLOW_STEP_CALLER, WORKFLOW_STEP_DUEDATE, WORKFLOW_STEP_FINISHDATE, WORKFLOW_STEP_ID, WORKFLOW_STEP_OWNER, WORKFLOW_STEP_STARTDATE, WORKFLOW_STEP_STATUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.solr.common.SolrInputDocument> _populateAdditionalData(Content content, org.apache.solr.common.SolrInputDocument document) Populate the solr input document by adding fields to index.List<org.apache.solr.common.SolrInputDocument> indexContent(Content content, org.apache.solr.common.SolrInputDocument document) Populate a solr input document by adding fields to index into it.protected voidindexContentTitle(Content content, org.apache.solr.common.SolrInputDocument document) Index the content titlevoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role. -
_resourceIndexer
The resource indexer -
_systemPropEP
The system property extension point. -
_contentHelper
The content helper -
_contentVisibleAttachmentIndexerEP
The extension point for ContentVisibleAttachmentIndexers -
_additionalDataIndexerEP
The additional property indexer extension point.
-
-
Constructor Details
-
SolrContentIndexer
public SolrContentIndexer()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
indexContent
public List<org.apache.solr.common.SolrInputDocument> indexContent(Content content, org.apache.solr.common.SolrInputDocument document) throws Exception Populate a solr input document by adding fields to index into it.- Parameters:
content- The content to indexdocument- The main solr document to index into- Returns:
- Additional documents for the content indexation
- Throws:
Exception- if an error occurred while indexing
-
indexContentTitle
protected void indexContentTitle(Content content, org.apache.solr.common.SolrInputDocument document) Index the content title- Parameters:
content- The titledocument- The main solr document to index into
-
_populateAdditionalData
protected List<org.apache.solr.common.SolrInputDocument> _populateAdditionalData(Content content, org.apache.solr.common.SolrInputDocument document) throws Exception Populate the solr input document by adding fields to index.- Parameters:
content- the content to index.document- the solr input document- Returns:
- Additional documents created by additional property indexers
- Throws:
Exception- if something goes wrong when processing the indexation of the content
-