Class SolrIndexerService
- java.lang.Object
-
- fr.paris.lutece.plugins.search.solr.indexer.SolrIndexerService
-
public final class SolrIndexerService extends java.lang.ObjectSolrIndexerService
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringbuildErrorMessage(java.lang.Exception exception)Build the message error of an exceptionstatic java.util.List<Field>getAdditionalFields()Returns the list of all dynamic fields.static java.lang.StringgetBaseUrl()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 Liststatic java.lang.StringgetRootUrl()Return the url of the Root of the webappstatic java.lang.StringBuildergetSbLogs()static java.lang.StringgetWebAppName()Return the name of the webappstatic java.lang.StringprocessDel()Del sorl index related to this site.static java.lang.StringprocessIndexing(boolean bCreate)Process the indexingstatic org.apache.solr.common.SolrInputDocumentsolrItem2SolrInputDocument(SolrItem solrItem)Convert aSolrItemobject into aSolrInputDocumentobjectstatic voidwrite(SolrItem solrItem)Index one document, called by plugin indexersstatic voidwrite(SolrItem solrItem, java.lang.StringBuilder sbLogs)Index one document, called by external codestatic voidwrite(java.util.Collection<SolrItem> solrItems)Index a collection of documents, called by plugin indexersstatic voidwrite(java.util.Collection<SolrItem> solrItems, java.lang.StringBuilder sbLogs)Index a collection of documents, called by external code
-
-
-
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 itemsbLogs- 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 itemsbLogs- 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 aSolrItemobject into aSolrInputDocumentobject- Parameters:
solrItem- the item to convert- Returns:
- A
SolrInputDocumentobject 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()
-
-