Class SolrIndexerService


  • public final class SolrIndexerService
    extends java.lang.Object
    SolrIndexerService
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String buildErrorMessage​(java.lang.Exception exception)
      Build the message error of an exception
      static java.util.List<Field> getAdditionalFields()
      Returns the list of all dynamic fields.
      static java.lang.String getBaseUrl()
      Return the url of the Portal of the webapp (eg http://host/WEBAPP/jsp/site/Portal.jsp)
      static java.util.List<SolrIndexer> getIndexers()
      Returns the indexers List
      static java.lang.String getRootUrl()
      Return the url of the Root of the webapp
      static java.lang.StringBuilder getSbLogs()  
      static java.lang.String getWebAppName()
      Return the name of the webapp
      static java.lang.String processDel()
      Del sorl index related to this site.
      static java.lang.String processIndexing​(boolean bCreate)
      Process the indexing
      static org.apache.solr.common.SolrInputDocument solrItem2SolrInputDocument​(SolrItem solrItem)
      Convert a SolrItem object into a SolrInputDocument object
      static void write​(SolrItem solrItem)
      Index one document, called by plugin indexers
      static void write​(SolrItem solrItem, java.lang.StringBuilder sbLogs)
      Index one document, called by external code
      static void write​(java.util.Collection<SolrItem> solrItems)
      Index a collection of documents, called by plugin indexers
      static void write​(java.util.Collection<SolrItem> solrItems, java.lang.StringBuilder sbLogs)
      Index a collection of documents, called by external code
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getIndexers

        public static java.util.List<SolrIndexer> getIndexers()
        Returns the indexers List
        Returns:
        the indexers List
      • write

        public static void write​(SolrItem solrItem)
                          throws java.io.IOException
        Index one document, called by plugin indexers
        Parameters:
        solrItem - The item
        Throws:
        java.io.IOException - i/o exception
      • write

        public static void write​(SolrItem solrItem,
                                 java.lang.StringBuilder sbLogs)
                          throws java.io.IOException
        Index one document, called by external code
        Parameters:
        solrItem - The item
        sbLogs - StringBuilder to write to
        Throws:
        java.io.IOException - i/o exception
      • write

        public static void write​(java.util.Collection<SolrItem> solrItems)
                          throws java.io.IOException
        Index a collection of documents, called by plugin indexers
        Parameters:
        solrItems - The item
        Throws:
        java.io.IOException - i/o exception
      • write

        public static void write​(java.util.Collection<SolrItem> solrItems,
                                 java.lang.StringBuilder sbLogs)
                          throws java.io.IOException
        Index a collection of documents, called by external code
        Parameters:
        solrItems - The item
        sbLogs - StringBuilder to write to
        Throws:
        java.io.IOException - i/o exception
      • processIndexing

        public static java.lang.String processIndexing​(boolean bCreate)
        Process the indexing
        Parameters:
        bCreate - tell if it's total indexing or total (total = true)
        Returns:
        the result log of the indexing
      • buildErrorMessage

        public static java.lang.String buildErrorMessage​(java.lang.Exception exception)
        Build the message error of an exception
        Parameters:
        exception - The exception
        Returns:
        the message error of the exception
      • getAdditionalFields

        public static java.util.List<Field> getAdditionalFields()
        Returns the list of all dynamic fields.
        Returns:
        the list of all additional fields
      • solrItem2SolrInputDocument

        public static org.apache.solr.common.SolrInputDocument solrItem2SolrInputDocument​(SolrItem solrItem)
        Convert a SolrItem object into a SolrInputDocument object
        Parameters:
        solrItem - the item to convert
        Returns:
        A SolrInputDocument object corresponding to the item parameter
      • getRootUrl

        public static java.lang.String getRootUrl()
        Return the url of the Root of the webapp
        Returns:
        strBase the webapp url
      • getBaseUrl

        public static java.lang.String getBaseUrl()
        Return the url of the Portal of the webapp (eg http://host/WEBAPP/jsp/site/Portal.jsp)
        Returns:
        strBase the webapp url
      • getWebAppName

        public static java.lang.String getWebAppName()
        Return the name of the webapp
        Returns:
        the name of the webapp
      • processDel

        public static java.lang.String processDel()
        Del sorl index related to this site.
        Returns:
        log of what appended
      • getSbLogs

        public static java.lang.StringBuilder getSbLogs()