public abstract class AbstractDocumentIndexer extends Object implements IndexerService
| Modifier and Type | Field and Description |
|---|---|
long |
commitRecCount |
WorkBibMarcDocBuilder |
workBibMarcDocBuilder1 |
BATCH_SIZE, BIBLIOGRAPHIC, DOC_FORMAT, DOC_TYPE, FAILURE, HOLDINGS_IDENTIFIER, ID_FIELD_PREFIX, INSTANCE, ITEM_IDENTIFIER, SUCCESS, UUID_FILE_NAME_SUFFIX| Constructor and Description |
|---|
AbstractDocumentIndexer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assignUUIDs(List<org.apache.solr.common.SolrInputDocument> solrDocs,
List<String> ids)
Assigns UUIDs for each document (that does not have an "id" field) in the given list.
|
String |
bind(List<RequestDocument> requestDocuments) |
String |
bind(RequestDocument requestDocument) |
protected String |
buildDeleteQuery(String uuid,
String category,
boolean commit)
Deprecated.
|
protected String |
buildDeleteQueryParamsForDeleteUrl(List<String> uuidList,
boolean commit)
Deprecated.
|
protected String |
buildFailureMsg() |
protected String |
buildFailureMsg(String id,
String msg) |
String |
buildUuid()
Builds a UUID value with an identifiable prefix.
|
String |
bulkIndexDocuments(List<RequestDocument> requestDocuments,
boolean isCommit)
Method to bulk Index Documents
|
void |
cleanupDiscoveryData() |
void |
commit() |
protected List<org.apache.solr.common.SolrInputDocument> |
convertToSolrDocs(String docCategory,
String docType,
String docFormat,
String docContent) |
String |
delete(List<RequestDocument> requestDocuments) |
String |
delete(RequestDocument requestDocument) |
String |
deleteDocument(String docCategory,
String uuid)
Deletes the document (if existing) with the given uuid.
|
protected String |
deleteDocumentByUUID(String uuid,
String category) |
protected String |
deleteDocumentByUUID(String uuid,
String category,
boolean commit) |
String |
deleteDocuments(String docCategory,
List<String> uuidList)
Deletes the documents (if existing) with the Ids specified in the given uuidList.
|
protected String |
deleteDocumentsByUUIDList(List<String> uuidsList,
String category) |
protected String |
deleteDocumentsByUUIDList(List<String> uuidList,
String category,
boolean commit) |
protected String |
getErrorID() |
List<org.apache.solr.common.SolrDocument> |
getSolrDocument(String fieldName,
String fieldValue) |
List<org.apache.solr.common.SolrDocument> |
getSolrDocumentBySolrId(String uniqueId) |
String |
indexDocument(RequestDocument requestDocument) |
String |
indexDocument(RequestDocument requestDocument,
boolean commit) |
String |
indexDocuments(List<RequestDocument> requestDocuments) |
String |
indexDocumentsFromDirBySolrDoc(String docCategory,
String docType,
String docFormat,
String dataDir)
Indexes the documents from the xml files in the given fileDir.
|
String |
indexDocumentsFromFileBySolrDoc(String docCategory,
String docType,
String docFormat,
String filePath) |
String |
indexDocumentsFromFiles(String docCategory,
String docType,
String docFormat,
List<File> fileList)
Indexes the records (of the given docCategory, docType and docFormat) from the files in the given data directory.
|
String |
indexDocumentsFromStringBySolrDoc(String docCategory,
String docType,
String docFormat,
String data) |
String |
indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs) |
String |
indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs,
boolean commit) |
protected String |
indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs,
boolean commit,
boolean optimize) |
protected String |
indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs,
boolean isCommit,
boolean optimize,
boolean waitFlush,
boolean waitSearcher) |
protected void |
init() |
protected void |
openConnection(URL inputURL)
Deprecated.
|
void |
rollback() |
org.apache.solr.client.solrj.response.QueryResponse |
searchBibRecord(String docCat,
String docType,
String docFormat,
String fieldName,
String fieldValue,
String fieldList) |
void |
transferInstances(List<RequestDocument> requestDocuments) |
void |
transferItems(List<RequestDocument> requestDocuments) |
String |
unbind(List<RequestDocument> requestDocuments) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitindexDocumentspublic WorkBibMarcDocBuilder workBibMarcDocBuilder1
public long commitRecCount
public AbstractDocumentIndexer()
protected void init()
public String deleteDocuments(String docCategory, List<String> uuidList) throws MalformedURLException, org.apache.solr.client.solrj.SolrServerException
IndexerServicedeleteDocuments in interface IndexerServiceMalformedURLExceptionorg.apache.solr.client.solrj.SolrServerExceptionpublic String deleteDocument(String docCategory, String uuid)
IndexerServicedeleteDocument in interface IndexerServicepublic String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)
indexSolrDocuments in interface IndexerServicepublic String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean commit)
public String indexDocumentsFromDirBySolrDoc(String docCategory, String docType, String docFormat, String dataDir)
IndexerServiceindexDocumentsFromDirBySolrDoc in interface IndexerServicepublic String indexDocumentsFromStringBySolrDoc(String docCategory, String docType, String docFormat, String data) throws IOException
indexDocumentsFromStringBySolrDoc in interface IndexerServiceIOExceptionpublic String indexDocumentsFromFileBySolrDoc(String docCategory, String docType, String docFormat, String filePath)
indexDocumentsFromFileBySolrDoc in interface IndexerServicepublic String indexDocumentsFromFiles(String docCategory, String docType, String docFormat, List<File> fileList)
This is a utility method to use Discovery separately from DocStore.
indexDocumentsFromFiles in interface IndexerServicedocCategory - category of the documents expected in the input filesdocType - type of the documents expected in the input filesdocFormat - format of the documents expected in the input filesfileList - list of files to be indexedpublic String indexDocument(RequestDocument requestDocument)
indexDocument in interface IndexerServicepublic String indexDocument(RequestDocument requestDocument, boolean commit)
indexDocument in interface IndexerServicepublic String indexDocuments(List<RequestDocument> requestDocuments)
indexDocuments in interface IndexerServicepublic String bulkIndexDocuments(List<RequestDocument> requestDocuments, boolean isCommit)
IndexerServicebulkIndexDocuments in interface IndexerServicepublic List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String uniqueId)
getSolrDocumentBySolrId in interface IndexerServicepublic List<org.apache.solr.common.SolrDocument> getSolrDocument(String fieldName, String fieldValue)
getSolrDocument in interface IndexerServicepublic String buildUuid()
buildUuid in interface IndexerServiceprotected void assignUUIDs(List<org.apache.solr.common.SolrInputDocument> solrDocs, List<String> ids) throws Exception
solrDocs - ids - List of id values (optional) to be used for the given documents.Exceptionpublic void commit() throws Exception
commit in interface IndexerServiceExceptionpublic void rollback() throws Exception
rollback in interface IndexerServiceExceptionprotected String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean isCommit, boolean optimize, boolean waitFlush, boolean waitSearcher) throws Exception
Exceptionprotected String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean commit, boolean optimize) throws Exception
Exceptionprotected List<org.apache.solr.common.SolrInputDocument> convertToSolrDocs(String docCategory, String docType, String docFormat, String docContent) throws Exception
Exceptionprotected String deleteDocumentByUUID(String uuid, String category, boolean commit)
protected String deleteDocumentByUUID(String uuid, String category)
protected String deleteDocumentsByUUIDList(List<String> uuidList, String category, boolean commit)
protected String deleteDocumentsByUUIDList(List<String> uuidsList, String category) throws org.apache.solr.client.solrj.SolrServerException, MalformedURLException
org.apache.solr.client.solrj.SolrServerExceptionMalformedURLException@Deprecated protected String buildDeleteQueryParamsForDeleteUrl(List<String> uuidList, boolean commit)
@Deprecated protected String buildDeleteQuery(String uuid, String category, boolean commit)
@Deprecated protected void openConnection(URL inputURL) throws Exception
inputURL - Exceptionprotected String getErrorID()
protected String buildFailureMsg(String id, String msg)
protected String buildFailureMsg()
public org.apache.solr.client.solrj.response.QueryResponse searchBibRecord(String docCat, String docType, String docFormat, String fieldName, String fieldValue, String fieldList)
searchBibRecord in interface IndexerServicepublic void cleanupDiscoveryData() throws IOException, org.apache.solr.client.solrj.SolrServerException
cleanupDiscoveryData in interface IndexerServiceIOExceptionorg.apache.solr.client.solrj.SolrServerExceptionpublic String bind(List<RequestDocument> requestDocuments) throws Exception
bind in interface IndexerServiceExceptionpublic String bind(RequestDocument requestDocument) throws Exception
bind in interface IndexerServiceExceptionpublic String unbind(List<RequestDocument> requestDocuments) throws Exception
unbind in interface IndexerServiceExceptionpublic void transferInstances(List<RequestDocument> requestDocuments) throws Exception
transferInstances in interface IndexerServiceExceptionpublic void transferItems(List<RequestDocument> requestDocuments) throws Exception
transferItems in interface IndexerServiceExceptionpublic String delete(List<RequestDocument> requestDocuments) throws Exception
delete in interface IndexerServiceExceptionpublic String delete(RequestDocument requestDocument) throws Exception
delete in interface IndexerServiceExceptionCopyright © 2004–2015 The Kuali Foundation. All rights reserved.