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

Component for Content indexing into a Solr server.
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      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 index
      document - The main solr document to index into
      Returns:
      Additional documents for repeater instances
      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 title
      document - The main solr document to index into
    • indexPartialSystemProperty

      public boolean indexPartialSystemProperty(Content content, String propertyId, org.apache.solr.common.SolrInputDocument document) throws Exception
      Populate a Solr input document by adding fields for a single system property.
      Parameters:
      content - The content to index
      propertyId - The system property ID.
      document - The solr document
      Returns:
      true if there are partial update to apply
      Throws:
      Exception - if an error occurred
    • indexPartialProperty

      public boolean indexPartialProperty(Content content, String propertyId, org.apache.solr.common.SolrInputDocument document) throws Exception
      Populate a Solr input document by adding fields for a single property.
      Parameters:
      content - The content to index
      propertyId - The property ID.
      document - The solr document
      Returns:
      true if there are partial update to apply
      Throws:
      Exception - if an error occurred
    • indexPartialProperty

      public boolean indexPartialProperty(Content content, Property property, org.apache.solr.common.SolrInputDocument document) throws Exception
      Populate a Solr input document by adding fields for a single property.
      Parameters:
      content - The content to index
      property - The property to index.
      document - The solr document
      Returns:
      true if there are partial update to apply
      Throws:
      Exception - if an error occurred