Package org.mycore.solr.index.handlers
Class MCRSolrAbstractIndexHandler
java.lang.Object
org.mycore.solr.index.handlers.MCRSolrAbstractIndexHandler
- All Implemented Interfaces:
MCRSolrIndexHandler
- Direct Known Subclasses:
MCRSolrAbstractStreamIndexHandler
,MCRSolrFilesIndexHandler
,MCRSolrInputDocumentHandler
,MCRSolrInputDocumentsHandler
,MCRSolrMCRContentIndexHandler
,MCRSolrMCRContentMapIndexHandler
,MCRSolrOptimizeIndexHandler
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected org.apache.solr.client.solrj.SolrClient
-
Constructor Summary
ConstructorDescriptionMCRSolrAbstractIndexHandler
(org.apache.solr.client.solrj.SolrClient solrClient) -
Method Summary
Modifier and TypeMethodDescriptionint
int
org.apache.solr.client.solrj.SolrClient
Returns a list of index handlers which should be executed after the default index process.protected org.apache.solr.client.solrj.request.UpdateRequest
getUpdateRequest
(String path) abstract void
index()
Commits something to solr.void
setCommitWithin
(int commitWithin) Time in milliseconds solr should index the stream. -1 by default, says that solr decide when to commit.void
setSolrServer
(org.apache.solr.client.solrj.SolrClient solrClient) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.solr.index.MCRSolrIndexHandler
getStatistic
-
Field Details
-
solrClient
protected org.apache.solr.client.solrj.SolrClient solrClient -
commitWithin
protected int commitWithin
-
-
Constructor Details
-
MCRSolrAbstractIndexHandler
public MCRSolrAbstractIndexHandler() -
MCRSolrAbstractIndexHandler
public MCRSolrAbstractIndexHandler(org.apache.solr.client.solrj.SolrClient solrClient)
-
-
Method Details
-
getSolrClient
public org.apache.solr.client.solrj.SolrClient getSolrClient()- Specified by:
getSolrClient
in interfaceMCRSolrIndexHandler
-
index
Description copied from interface:MCRSolrIndexHandler
Commits something to solr.- Specified by:
index
in interfaceMCRSolrIndexHandler
- Throws:
IOException
org.apache.solr.client.solrj.SolrServerException
-
getSubHandlers
Description copied from interface:MCRSolrIndexHandler
Returns a list of index handlers which should be executed after the default index process. Return an empty list if no sub handlers are defined.- Specified by:
getSubHandlers
in interfaceMCRSolrIndexHandler
- Returns:
- list of
MCRSolrIndexHandler
-
setCommitWithin
public void setCommitWithin(int commitWithin) Time in milliseconds solr should index the stream. -1 by default, says that solr decide when to commit.- Specified by:
setCommitWithin
in interfaceMCRSolrIndexHandler
-
getCommitWithin
public int getCommitWithin()- Specified by:
getCommitWithin
in interfaceMCRSolrIndexHandler
-
setSolrServer
public void setSolrServer(org.apache.solr.client.solrj.SolrClient solrClient) - Specified by:
setSolrServer
in interfaceMCRSolrIndexHandler
-
getDocuments
public int getDocuments()- Specified by:
getDocuments
in interfaceMCRSolrIndexHandler
-
getUpdateRequest
-