Class SolrIndexerService
- java.lang.Object
-
- fr.paris.lutece.plugins.search.solr.indexer.SolrIndexerService
-
public final class SolrIndexerService extends Object
SolrIndexerService
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildErrorMessage(Exception exception)Build the message error of an exceptionstatic List<Field>getAdditionalFields()Returns the list of all dynamic fields.static StringgetBaseUrl()Return the url of the Portal of the webapp (eg http://host/WEBAPP/jsp/site/Portal.jsp)static List<SolrIndexer>getIndexers()Returns the indexers Liststatic StringgetRootUrl()Return the url of the Root of the webappstatic StringBuildergetSbLogs()static StringgetWebAppName()Return the name of the webappstatic StringprocessDel()Del sorl index related to this site.static 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, StringBuilder sbLogs)Index one document, called by external codestatic voidwrite(Collection<SolrItem> solrItems)Index a collection of documents, called by plugin indexersstatic voidwrite(Collection<SolrItem> solrItems, StringBuilder sbLogs)Index a collection of documents, called by external code
-
-
-
Method Detail
-
getIndexers
public static List<SolrIndexer> getIndexers()
Returns the indexers List- Returns:
- the indexers List
-
write
public static void write(SolrItem solrItem) throws IOException
Index one document, called by plugin indexers- Parameters:
solrItem- The item- Throws:
IOException- i/o exception
-
write
public static void write(SolrItem solrItem, StringBuilder sbLogs) throws IOException
Index one document, called by external code- Parameters:
solrItem- The itemsbLogs- StringBuilder to write to- Throws:
IOException- i/o exception
-
write
public static void write(Collection<SolrItem> solrItems) throws IOException
Index a collection of documents, called by plugin indexers- Parameters:
solrItems- The item- Throws:
IOException- i/o exception
-
write
public static void write(Collection<SolrItem> solrItems, StringBuilder sbLogs) throws IOException
Index a collection of documents, called by external code- Parameters:
solrItems- The itemsbLogs- StringBuilder to write to- Throws:
IOException- i/o exception
-
processIndexing
public static 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 String buildErrorMessage(Exception exception)
Build the message error of an exception- Parameters:
exception- The exception- Returns:
- the message error of the exception
-
getAdditionalFields
public static 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 String getRootUrl()
Return the url of the Root of the webapp- Returns:
- strBase the webapp url
-
getBaseUrl
public static 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 String getWebAppName()
Return the name of the webapp- Returns:
- the name of the webapp
-
processDel
public static String processDel()
Del sorl index related to this site.- Returns:
- log of what appended
-
getSbLogs
public static StringBuilder getSbLogs()
-
-