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, wait
indexDocuments
public 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
IndexerService
deleteDocuments
in interface IndexerService
MalformedURLException
org.apache.solr.client.solrj.SolrServerException
public String deleteDocument(String docCategory, String uuid)
IndexerService
deleteDocument
in interface IndexerService
public String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs)
indexSolrDocuments
in interface IndexerService
public String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean commit)
public String indexDocumentsFromDirBySolrDoc(String docCategory, String docType, String docFormat, String dataDir)
IndexerService
indexDocumentsFromDirBySolrDoc
in interface IndexerService
public String indexDocumentsFromStringBySolrDoc(String docCategory, String docType, String docFormat, String data) throws IOException
indexDocumentsFromStringBySolrDoc
in interface IndexerService
IOException
public String indexDocumentsFromFileBySolrDoc(String docCategory, String docType, String docFormat, String filePath)
indexDocumentsFromFileBySolrDoc
in interface IndexerService
public 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 IndexerService
docCategory
- 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 IndexerService
public String indexDocument(RequestDocument requestDocument, boolean commit)
indexDocument
in interface IndexerService
public String indexDocuments(List<RequestDocument> requestDocuments)
indexDocuments
in interface IndexerService
public String bulkIndexDocuments(List<RequestDocument> requestDocuments, boolean isCommit)
IndexerService
bulkIndexDocuments
in interface IndexerService
public List<org.apache.solr.common.SolrDocument> getSolrDocumentBySolrId(String uniqueId)
getSolrDocumentBySolrId
in interface IndexerService
public List<org.apache.solr.common.SolrDocument> getSolrDocument(String fieldName, String fieldValue)
getSolrDocument
in interface IndexerService
public String buildUuid()
buildUuid
in interface IndexerService
protected 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.Exception
public void commit() throws Exception
commit
in interface IndexerService
Exception
public void rollback() throws Exception
rollback
in interface IndexerService
Exception
protected String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean isCommit, boolean optimize, boolean waitFlush, boolean waitSearcher) throws Exception
Exception
protected String indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean commit, boolean optimize) throws Exception
Exception
protected List<org.apache.solr.common.SolrInputDocument> convertToSolrDocs(String docCategory, String docType, String docFormat, String docContent) throws Exception
Exception
protected 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.SolrServerException
MalformedURLException
@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
- Exception
protected 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 IndexerService
public void cleanupDiscoveryData() throws IOException, org.apache.solr.client.solrj.SolrServerException
cleanupDiscoveryData
in interface IndexerService
IOException
org.apache.solr.client.solrj.SolrServerException
public String bind(List<RequestDocument> requestDocuments) throws Exception
bind
in interface IndexerService
Exception
public String bind(RequestDocument requestDocument) throws Exception
bind
in interface IndexerService
Exception
public String unbind(List<RequestDocument> requestDocuments) throws Exception
unbind
in interface IndexerService
Exception
public void transferInstances(List<RequestDocument> requestDocuments) throws Exception
transferInstances
in interface IndexerService
Exception
public void transferItems(List<RequestDocument> requestDocuments) throws Exception
transferItems
in interface IndexerService
Exception
public String delete(List<RequestDocument> requestDocuments) throws Exception
delete
in interface IndexerService
Exception
public String delete(RequestDocument requestDocument) throws Exception
delete
in interface IndexerService
Exception
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.