public class BibMarcIndexer extends DocstoreSolrIndexService implements BibConstants
Modifier and Type | Field and Description |
---|---|
static BibMarcRecordProcessor |
recordProcessor |
ID_FIELD_PREFIX, MAX_WARM_SEARCH, MAX_WARM_SEARCH_COUNT, TIME_FOR_WARMING_SEARCHERS
ALL_TEXT, AUTHOR_DISPLAY, AUTHOR_FACET, AUTHOR_SEARCH, AUTHOR_SORT, BIB_ID, CHECK_OUT_DUE_DATE_TIME, CLMS_RET_FLAG, CLMS_RET_FLAG_CRE_DATE, CLMS_RET_NOTE, COVERAGE_DISPLAY, COVERAGE_SEARCH, CREATED_BY, CURRENT_BORROWER, DATE_ENTERED, DATE_UPDATED, DESCRIPTION_DISPLAY, DESCRIPTION_SEARCH, DOC_CATEGORY, DOC_CATEGORY_VALUE, DOC_FORMAT, DOC_FORMAT_INSTANCE_VALUE, DOC_TYPE, DOC_TYPE_HOLDING_VALUE, DOC_TYPE_INSTANCE_VALUE, DOC_TYPE_ITEM_VALUE, DUE_DATE_TIME, EDITION_DISPLAY, EDITION_SEARCH, FORMAT_DISPLAY, FORMAT_FACET, FORMAT_SEARCH, GENRE_FACET, ID, IS_ANALYTIC, IS_SERIES, ISBN_DISPLAY, ISBN_NOT_NORMALIZED, ISBN_SEARCH, ISSN_DISPLAY, ISSN_SEARCH, ITEM_STATUS_EFFECTIVE_DATE, JOURNAL_TITLE_DISPLAY, JOURNAL_TITLE_SEARCH, JOURNAL_TITLE_SORT, LANGUAGE_DISPLAY, LANGUAGE_FACET, LANGUAGE_SEARCH, LEADER, LOCALID_DISPLAY, LOCALID_SEARCH, PROXY_BORROWER, PUBLICATIONDATE_DISPLAY, PUBLICATIONDATE_FACET, PUBLICATIONDATE_SEARCH, PUBLICATIONDATE_SORT, PUBLISHER_DISPLAY, PUBLISHER_SEARCH, RELATION_DISPLAY, RELATION_SEARCH, STAFF_ONLY_FLAG, STATUS_DISPLAY, STATUS_SEARCH, STATUS_UPDATED_ON, SUBJECT_DISPLAY, SUBJECT_FACET, SUBJECT_SEARCH, SYSTEM_CONTROL_NUMBER, TITLE_DISPLAY, TITLE_SEARCH, TITLE_SORT, TYPE_DISPLAY, TYPE_SEARCH, UNIQUE_ID, UPDATED_BY
Constructor and Description |
---|
BibMarcIndexer() |
Modifier and Type | Method and Description |
---|---|
void |
bind(String holdingsId,
List<String> bibIds) |
void |
bindAnalytics(String seriesHoldingsId,
List<String> itemIds,
String createOrBreak) |
Object |
buildFieldValue(String fieldName,
BibMarcRecord record)
Method to build Field Value for a given field Name and given record.
|
Object |
buildPublicationDateFacetValue(String publicationDate,
String publicationEndDate) |
List<String> |
buildPublicationDateFacetValues(List<String> publicationDates)
Builds the facet values for the given publication dates.
|
org.apache.solr.common.SolrInputDocument |
buildSolrInputDocument(BibMarcRecord record)
Method to build Solr Input Document from a given Work Bib Marc Record
|
org.apache.solr.common.SolrInputDocument |
buildSolrInputDocument(BibMarcRecord record,
org.apache.solr.common.SolrInputDocument solrDoc) |
protected void |
buildSolrInputDocument(Object object,
List<org.apache.solr.common.SolrInputDocument> solrInputDocuments) |
void |
createTree(Object object) |
void |
createTrees(Object object) |
void |
createTrees(Object object,
ReindexBatchStatistics reindexBatchStatistics) |
protected void |
deleteRecordInSolr(org.apache.solr.client.solrj.SolrServer solrServer,
String id) |
String |
extractPublicationDateWithRegex(String publicationDate) |
String |
getAllText(BibMarcRecord record)
Method to give all_text field to a given record.
|
static BibMarcIndexer |
getInstance() |
String |
getRecordFormat(BibMarcRecord record)
Method to get Record Format.
|
List<String> |
getSortString(List<String> list) |
String |
getSortString(String str) |
protected void |
indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs,
boolean isCommit,
ReindexBatchStatistics reindexBatchStatistics) |
void |
processBibTrees(BibTrees bibTrees)
process Bib Trees and commit once to solr.
|
protected void |
setCommonFields(Bib bib,
org.apache.solr.common.SolrInputDocument solrInputDocument) |
protected void |
updateBibDocument(Object object,
List<org.apache.solr.common.SolrInputDocument> solrInputDocuments,
org.apache.solr.common.SolrInputDocument solrbibInputDocument)
Updating Bib solr document with holding and other details
|
protected void |
updateRecordInSolr(Object object,
List<org.apache.solr.common.SolrInputDocument> solrInputDocuments) |
addBibInfoForHoldingsOrItems, addBibInfoForHoldingsOrItems, addHoldingsInfoToItem, appendData, assignUUIDs, buildLocationNameAndLocationLevel, buildSolrInputDocFromSolrDoc, buildSolrInputDocFromSolrDoc, buildSortableCallNumber, create, delete, getSolrDocumentBySolrId, getSolrDocumentByUUID, getSolrDocumentByUUIDs, indexAndDelete, indexSolrDocuments, modifySolrDocForDestination, modifySolrDocForSource, processDelete, processRecord, removeFieldFromSolrInputDocument, rollback, transfer, update
public static BibMarcRecordProcessor recordProcessor
public BibMarcIndexer()
public static BibMarcIndexer getInstance()
public void createTree(Object object)
createTree
in interface DocumentIndexer
createTree
in class DocstoreSolrIndexService
public void createTrees(Object object)
createTrees
in interface DocumentIndexer
createTrees
in class DocstoreSolrIndexService
public void processBibTrees(BibTrees bibTrees)
processBibTrees
in interface DocumentIndexer
processBibTrees
in class DocstoreSolrIndexService
bibTrees
- public void createTrees(Object object, ReindexBatchStatistics reindexBatchStatistics)
protected void indexSolrDocuments(List<org.apache.solr.common.SolrInputDocument> solrDocs, boolean isCommit, ReindexBatchStatistics reindexBatchStatistics)
protected void buildSolrInputDocument(Object object, List<org.apache.solr.common.SolrInputDocument> solrInputDocuments)
buildSolrInputDocument
in class DocstoreSolrIndexService
protected void setCommonFields(Bib bib, org.apache.solr.common.SolrInputDocument solrInputDocument)
protected void updateRecordInSolr(Object object, List<org.apache.solr.common.SolrInputDocument> solrInputDocuments)
updateRecordInSolr
in class DocstoreSolrIndexService
protected void updateBibDocument(Object object, List<org.apache.solr.common.SolrInputDocument> solrInputDocuments, org.apache.solr.common.SolrInputDocument solrbibInputDocument)
object
- solrInputDocuments
- solrbibInputDocument
- protected void deleteRecordInSolr(org.apache.solr.client.solrj.SolrServer solrServer, String id) throws IOException, org.apache.solr.client.solrj.SolrServerException
deleteRecordInSolr
in class DocstoreSolrIndexService
IOException
org.apache.solr.client.solrj.SolrServerException
public org.apache.solr.common.SolrInputDocument buildSolrInputDocument(BibMarcRecord record)
record
- public org.apache.solr.common.SolrInputDocument buildSolrInputDocument(BibMarcRecord record, org.apache.solr.common.SolrInputDocument solrDoc)
public Object buildFieldValue(String fieldName, BibMarcRecord record)
fieldName
- - field name should be one of the defined names in WorkBibMarcDocBuilderrecord
- - WorkBibMarcRecordpublic String getAllText(BibMarcRecord record)
record
- public String getRecordFormat(BibMarcRecord record)
record
- public String extractPublicationDateWithRegex(String publicationDate)
public Object buildPublicationDateFacetValue(String publicationDate, String publicationEndDate)
publicationDate
- publicationEndDate
- public List<String> buildPublicationDateFacetValues(List<String> publicationDates)
publicationDates
- public String getSortString(String str)
public List<String> getSortString(List<String> list)
public void bind(String holdingsId, List<String> bibIds) throws org.apache.solr.client.solrj.SolrServerException, IOException
bind
in interface DocumentIndexer
bind
in class DocstoreSolrIndexService
org.apache.solr.client.solrj.SolrServerException
IOException
public void bindAnalytics(String seriesHoldingsId, List<String> itemIds, String createOrBreak) throws org.apache.solr.client.solrj.SolrServerException, IOException
bindAnalytics
in interface DocumentIndexer
bindAnalytics
in class DocstoreSolrIndexService
org.apache.solr.client.solrj.SolrServerException
IOException
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.