Class MCRSolrFilesIndexHandler
java.lang.Object
org.mycore.solr.index.handlers.MCRSolrAbstractIndexHandler
org.mycore.solr.index.handlers.stream.MCRSolrFilesIndexHandler
- All Implemented Interfaces:
MCRSolrIndexHandler
Commits
MCRFile
objects to solr, be aware that the files are
not indexed directly, but added to a list of sub index handlers.- Author:
- Matthias Eichner
-
Field Summary
Fields inherited from class org.mycore.solr.index.handlers.MCRSolrAbstractIndexHandler
commitWithin, solrClient
-
Constructor Summary
ConstructorDescriptionMCRSolrFilesIndexHandler
(String mcrID, org.apache.solr.client.solrj.SolrClient solrClient) Creates a new solr file index handler. -
Method Summary
Modifier and TypeMethodDescriptionint
getID()
Returns a list of index handlers which should be executed after the default index process.void
index()
Commits something to solr.protected void
indexDerivate
(MCRObjectID derivateID) protected void
indexObject
(MCRObjectID objectID) toString()
Methods inherited from class org.mycore.solr.index.handlers.MCRSolrAbstractIndexHandler
getCommitWithin, getSolrClient, getUpdateRequest, setCommitWithin, setSolrServer
-
Field Details
-
mcrID
-
subHandlerList
-
-
Constructor Details
-
MCRSolrFilesIndexHandler
Creates a new solr file index handler.- Parameters:
mcrID
- id of the derivate or mcrobject, if you put a mcrobject id here all files of each derivate are indexedsolrClient
- where to index
-
-
Method Details
-
index
Description copied from interface:MCRSolrIndexHandler
Commits something to solr.- Specified by:
index
in interfaceMCRSolrIndexHandler
- Specified by:
index
in classMCRSolrAbstractIndexHandler
- Throws:
IOException
org.apache.solr.client.solrj.SolrServerException
-
indexDerivate
- Throws:
IOException
-
indexObject
- Throws:
IOException
-
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
- Overrides:
getSubHandlers
in classMCRSolrAbstractIndexHandler
- Returns:
- list of
MCRSolrIndexHandler
-
getID
-
getStatistic
-
getDocuments
public int getDocuments()- Specified by:
getDocuments
in interfaceMCRSolrIndexHandler
- Overrides:
getDocuments
in classMCRSolrAbstractIndexHandler
-
toString
-