public class SolrInformationServer extends Object implements InformationServer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SolrInformationServer.FTSStatus |
| Modifier and Type | Field and Description |
|---|---|
static String |
AND |
static int |
BATCH_FACET_TXS |
static String |
DOC_TYPE_ACL |
static String |
DOC_TYPE_ACL_TX |
static String |
DOC_TYPE_ERROR_NODE |
static String |
DOC_TYPE_NODE |
static String |
DOC_TYPE_STATE |
static String |
DOC_TYPE_TX |
static String |
DOC_TYPE_UNINDEXED_NODE |
static String |
FINGERPRINT_FIELD |
static String |
indexCapId |
protected static org.slf4j.Logger |
log |
static String |
OR |
static String |
PREFIX_ERROR |
static String |
REQUEST_HANDLER_ALFRESCO |
static String |
REQUEST_HANDLER_ALFRESCO_FULL_TEXT_SEARCH |
static String |
REQUEST_HANDLER_GET |
static String |
REQUEST_HANDLER_NATIVE |
static String |
REQUEST_HANDLER_SELECT |
static String |
RESPONSE_DEFAULT_ID |
static String |
RESPONSE_DEFAULT_IDS |
static String |
SOLR_BASEURL |
static String |
SOLR_HOST |
static String |
SOLR_PORT |
PROP_PREFIX_PARENT_ASPECT, PROP_PREFIX_PARENT_TYPE| Constructor and Description |
|---|
SolrInformationServer(AlfrescoCoreAdminHandler adminHandler,
org.apache.solr.core.SolrCore core,
org.alfresco.solr.client.SOLRAPIClient repositoryClient,
SolrContentStore solrContentStore) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
aclChangeSetInIndex(long changeSetId,
boolean populateCache) |
void |
addCommonNodeReportInfo(org.alfresco.solr.NodeReport nodeReport) |
void |
addFTSStatusCounts(org.apache.solr.common.util.NamedList<Object> report) |
void |
afterInitModels() |
void |
capIndex(long dbid) |
void |
cascadeNodes(List<org.alfresco.solr.client.NodeMetaData> nodeMetaDatas,
boolean overwrite) |
org.alfresco.solr.AclReport |
checkAclInIndex(Long aclid,
org.alfresco.solr.AclReport aclReport) |
void |
clearProcessedAclChangeSets() |
void |
clearProcessedTransactions() |
void |
commit() |
boolean |
commit(boolean openSearcher) |
void |
continueState(org.alfresco.solr.TrackerState state) |
void |
deleteByAclChangeSetId(Long aclChangeSetId) |
void |
deleteByAclId(Long aclId) |
void |
deleteByNodeId(Long nodeId) |
void |
deleteByTransactionId(Long transactionId) |
void |
dirtyTransaction(long txnId) |
int |
getAclTxDocsSize(String aclTxId,
String aclTxCommitTime) |
AlfrescoCoreAdminHandler |
getAdminHandler() |
List<org.alfresco.solr.client.AlfrescoModel> |
getAlfrescoModels() |
String |
getAlfrescoVersion() |
String |
getBaseUrl() |
List<org.alfresco.solr.client.NodeMetaData> |
getCascadeNodes(List<Long> txnIds) |
List<org.alfresco.solr.client.Transaction> |
getCascades(int num) |
Iterable<Map.Entry<String,Object>> |
getCoreStats() |
org.alfresco.repo.dictionary.DictionaryComponent |
getDictionaryService(String alternativeDictionary) |
List<AlfrescoSolrDataModel.TenantAclIdDbId> |
getDocsWithUncleanContent(int start,
int rows) |
Set<Long> |
getErrorDocIds() |
long |
getHoleRetention() |
String |
getHostName() |
long |
getIndexCap() |
org.alfresco.repo.dictionary.M2Model |
getM2Model(org.alfresco.service.namespace.QName modelQName) |
org.alfresco.solr.client.AclChangeSet |
getMaxAclChangeSetIdAndCommitTimeInIndex() |
org.alfresco.solr.client.Transaction |
getMaxTransactionIdAndCommitTimeInIndex() |
Map<String,Set<String>> |
getModelErrors() |
org.alfresco.repo.dictionary.NamespaceDAO |
getNamespaceDAO() |
org.alfresco.solr.adapters.IOpenBitSet |
getOpenBitSetInstance() |
int |
getPort() |
Properties |
getProps() |
int |
getRegisteredSearcherCount() |
<T> org.alfresco.solr.adapters.ISimpleOrderedMap<T> |
getSimpleOrderedMapInstance() |
SolrContentStore |
getSolrContentStore() |
org.alfresco.solr.TrackerState |
getTrackerInitialState() |
org.alfresco.solr.tracker.TrackerStats |
getTrackerStats() |
int |
getTxDocsSize(String targetTxId,
String targetTxCommitTime) |
void |
hardCommit() |
long |
indexAcl(List<org.alfresco.solr.client.AclReaders> aclReaderList,
boolean overwrite) |
void |
indexAclTransaction(org.alfresco.solr.client.AclChangeSet changeSet,
boolean overwrite) |
void |
indexNode(org.alfresco.solr.client.Node node,
boolean overwrite) |
void |
indexNodes(List<org.alfresco.solr.client.Node> nodes,
boolean overwrite,
boolean cascade) |
void |
indexTransaction(org.alfresco.solr.client.Transaction info,
boolean overwrite) |
void |
initSkippingDescendantDocs() |
boolean |
isInIndex(String id) |
void |
maintainCap(long dbid) |
long |
maxNodeId() |
long |
minNodeId() |
long |
nodeCount() |
void |
putAclTransactionState(org.apache.solr.update.processor.UpdateRequestProcessor processor,
org.apache.solr.request.SolrQueryRequest request,
org.alfresco.solr.client.AclChangeSet changeSet) |
boolean |
putModel(org.alfresco.repo.dictionary.M2Model model) |
void |
putTransactionState(org.apache.solr.update.processor.UpdateRequestProcessor processor,
org.apache.solr.request.SolrQueryRequest request,
org.alfresco.solr.client.Transaction tx)
Puts the latest transaction state onto the index
|
void |
registerTrackerThread() |
void |
reindexNodeByQuery(String query) |
org.alfresco.solr.tracker.IndexHealthReport |
reportAclTransactionsInIndex(Long minAclTxId,
org.alfresco.solr.adapters.IOpenBitSet aclTxIdsInDb,
long maxAclTxId) |
org.alfresco.solr.tracker.IndexHealthReport |
reportIndexTransactions(Long minTxId,
org.alfresco.solr.adapters.IOpenBitSet txIdsInDb,
long maxTxId) |
void |
rollback() |
void |
setCleanCascadeTxnFloor(long cleanCascadeTxnFloor) |
void |
setCleanContentTxnFloor(long cleanContentTxnFloor) |
boolean |
txnInIndex(long txnId,
boolean populateCache) |
void |
unregisterTrackerThread() |
void |
updateContentToIndexAndCache(long dbId,
String tenant) |
void |
updateTransaction(org.alfresco.solr.client.Transaction txn) |
public static final String AND
public static final String OR
public static final String REQUEST_HANDLER_ALFRESCO_FULL_TEXT_SEARCH
public static final String REQUEST_HANDLER_NATIVE
public static final String REQUEST_HANDLER_ALFRESCO
public static final String REQUEST_HANDLER_SELECT
public static final String REQUEST_HANDLER_GET
public static final String RESPONSE_DEFAULT_IDS
public static final String RESPONSE_DEFAULT_ID
public static final String PREFIX_ERROR
public static final String DOC_TYPE_NODE
public static final String DOC_TYPE_UNINDEXED_NODE
public static final String DOC_TYPE_ERROR_NODE
public static final String DOC_TYPE_ACL
public static final String DOC_TYPE_TX
public static final String DOC_TYPE_ACL_TX
public static final String DOC_TYPE_STATE
public static final String SOLR_HOST
public static final String SOLR_PORT
public static final String SOLR_BASEURL
public static String indexCapId
public static final int BATCH_FACET_TXS
public static final String FINGERPRINT_FIELD
protected static final org.slf4j.Logger log
public SolrInformationServer(AlfrescoCoreAdminHandler adminHandler, org.apache.solr.core.SolrCore core, org.alfresco.solr.client.SOLRAPIClient repositoryClient, SolrContentStore solrContentStore)
public AlfrescoCoreAdminHandler getAdminHandler()
getAdminHandler in interface InformationServerpublic void initSkippingDescendantDocs()
initSkippingDescendantDocs in interface InformationServerpublic void addFTSStatusCounts(org.apache.solr.common.util.NamedList<Object> report)
addFTSStatusCounts in interface InformationServerpublic String getAlfrescoVersion()
public void afterInitModels()
afterInitModels in interface InformationServerpublic org.alfresco.solr.AclReport checkAclInIndex(Long aclid, org.alfresco.solr.AclReport aclReport)
checkAclInIndex in interface InformationServerpublic org.alfresco.solr.tracker.IndexHealthReport reportIndexTransactions(Long minTxId, org.alfresco.solr.adapters.IOpenBitSet txIdsInDb, long maxTxId) throws IOException
reportIndexTransactions in interface InformationServerIOExceptionpublic org.alfresco.solr.tracker.IndexHealthReport reportAclTransactionsInIndex(Long minAclTxId, org.alfresco.solr.adapters.IOpenBitSet aclTxIdsInDb, long maxAclTxId)
reportAclTransactionsInIndex in interface InformationServerpublic List<AlfrescoSolrDataModel.TenantAclIdDbId> getDocsWithUncleanContent(int start, int rows) throws IOException
getDocsWithUncleanContent in interface InformationServerIOExceptionpublic void addCommonNodeReportInfo(org.alfresco.solr.NodeReport nodeReport)
addCommonNodeReportInfo in interface InformationServerpublic void commit()
throws IOException
commit in interface InformationServerIOExceptionpublic void hardCommit()
throws IOException
hardCommit in interface InformationServerIOExceptionpublic boolean commit(boolean openSearcher)
throws IOException
commit in interface InformationServerIOExceptionpublic void deleteByAclChangeSetId(Long aclChangeSetId) throws IOException
deleteByAclChangeSetId in interface InformationServerIOExceptionpublic void deleteByAclId(Long aclId) throws IOException
deleteByAclId in interface InformationServerIOExceptionpublic void deleteByNodeId(Long nodeId) throws IOException
deleteByNodeId in interface InformationServerIOExceptionpublic void deleteByTransactionId(Long transactionId) throws IOException
deleteByTransactionId in interface InformationServerIOExceptionpublic List<org.alfresco.solr.client.AlfrescoModel> getAlfrescoModels()
getAlfrescoModels in interface InformationServerpublic Iterable<Map.Entry<String,Object>> getCoreStats() throws IOException
getCoreStats in interface InformationServerIOExceptionpublic org.alfresco.repo.dictionary.DictionaryComponent getDictionaryService(String alternativeDictionary)
getDictionaryService in interface InformationServerpublic int getTxDocsSize(String targetTxId, String targetTxCommitTime) throws IOException
getTxDocsSize in interface InformationServerIOExceptionpublic int getAclTxDocsSize(String aclTxId, String aclTxCommitTime) throws IOException
getAclTxDocsSize in interface InformationServerIOExceptionpublic Set<Long> getErrorDocIds() throws IOException
getErrorDocIds in interface InformationServerIOExceptionpublic long getHoleRetention()
getHoleRetention in interface InformationServerpublic org.alfresco.repo.dictionary.M2Model getM2Model(org.alfresco.service.namespace.QName modelQName)
getM2Model in interface InformationServerpublic Map<String,Set<String>> getModelErrors()
getModelErrors in interface InformationServerpublic org.alfresco.repo.dictionary.NamespaceDAO getNamespaceDAO()
getNamespaceDAO in interface InformationServerpublic org.alfresco.solr.adapters.IOpenBitSet getOpenBitSetInstance()
getOpenBitSetInstance in interface org.alfresco.solr.InformationServerCollectionProviderpublic int getRegisteredSearcherCount()
getRegisteredSearcherCount in interface InformationServerpublic <T> org.alfresco.solr.adapters.ISimpleOrderedMap<T> getSimpleOrderedMapInstance()
getSimpleOrderedMapInstance in interface org.alfresco.solr.InformationServerCollectionProviderpublic org.alfresco.solr.tracker.TrackerStats getTrackerStats()
getTrackerStats in interface InformationServerpublic org.alfresco.solr.TrackerState getTrackerInitialState()
getTrackerInitialState in interface InformationServerpublic void continueState(org.alfresco.solr.TrackerState state)
continueState in interface InformationServerpublic long indexAcl(List<org.alfresco.solr.client.AclReaders> aclReaderList, boolean overwrite) throws IOException
indexAcl in interface InformationServerIOExceptionpublic void indexAclTransaction(org.alfresco.solr.client.AclChangeSet changeSet,
boolean overwrite)
throws IOException
indexAclTransaction in interface InformationServerIOExceptionpublic org.alfresco.solr.client.AclChangeSet getMaxAclChangeSetIdAndCommitTimeInIndex()
getMaxAclChangeSetIdAndCommitTimeInIndex in interface InformationServerpublic void dirtyTransaction(long txnId)
dirtyTransaction in interface InformationServerpublic void putAclTransactionState(org.apache.solr.update.processor.UpdateRequestProcessor processor,
org.apache.solr.request.SolrQueryRequest request,
org.alfresco.solr.client.AclChangeSet changeSet)
throws IOException
IOExceptionpublic void capIndex(long dbid)
throws IOException
capIndex in interface InformationServerIOExceptionpublic void maintainCap(long dbid)
throws IOException
maintainCap in interface InformationServerIOExceptionpublic long nodeCount()
nodeCount in interface InformationServerpublic long maxNodeId()
maxNodeId in interface InformationServerpublic long minNodeId()
minNodeId in interface InformationServerpublic long getIndexCap()
getIndexCap in interface InformationServerpublic void indexNode(org.alfresco.solr.client.Node node,
boolean overwrite)
throws IOException,
org.alfresco.httpclient.AuthenticationException,
org.json.JSONException
indexNode in interface InformationServerIOExceptionorg.alfresco.httpclient.AuthenticationExceptionorg.json.JSONExceptionpublic List<org.alfresco.solr.client.NodeMetaData> getCascadeNodes(List<Long> txnIds) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
getCascadeNodes in interface InformationServerorg.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONExceptionpublic void indexNodes(List<org.alfresco.solr.client.Node> nodes, boolean overwrite, boolean cascade) throws IOException, org.alfresco.httpclient.AuthenticationException, org.json.JSONException
indexNodes in interface InformationServerIOExceptionorg.alfresco.httpclient.AuthenticationExceptionorg.json.JSONExceptionpublic void cascadeNodes(List<org.alfresco.solr.client.NodeMetaData> nodeMetaDatas, boolean overwrite) throws IOException, org.alfresco.httpclient.AuthenticationException, org.json.JSONException
cascadeNodes in interface InformationServerIOExceptionorg.alfresco.httpclient.AuthenticationExceptionorg.json.JSONExceptionpublic void updateContentToIndexAndCache(long dbId,
String tenant)
throws Exception
updateContentToIndexAndCache in interface InformationServerExceptionpublic void updateTransaction(org.alfresco.solr.client.Transaction txn)
throws IOException
updateTransaction in interface InformationServerIOExceptionpublic void indexTransaction(org.alfresco.solr.client.Transaction info,
boolean overwrite)
throws IOException
indexTransaction in interface InformationServerIOExceptionpublic org.alfresco.solr.client.Transaction getMaxTransactionIdAndCommitTimeInIndex()
getMaxTransactionIdAndCommitTimeInIndex in interface InformationServerpublic void putTransactionState(org.apache.solr.update.processor.UpdateRequestProcessor processor,
org.apache.solr.request.SolrQueryRequest request,
org.alfresco.solr.client.Transaction tx)
throws IOException
processor - UpdateRequestProcessorrequest - SolrQueryRequesttx - TransactionIOExceptionpublic boolean isInIndex(String id) throws IOException
isInIndex in interface InformationServerid - StringIOExceptionpublic List<org.alfresco.solr.client.Transaction> getCascades(int num) throws IOException
getCascades in interface InformationServerIOExceptionpublic boolean txnInIndex(long txnId,
boolean populateCache)
throws IOException
txnInIndex in interface InformationServerIOExceptionpublic boolean aclChangeSetInIndex(long changeSetId,
boolean populateCache)
throws IOException
aclChangeSetInIndex in interface InformationServerIOExceptionpublic void clearProcessedTransactions()
clearProcessedTransactions in interface InformationServerpublic void clearProcessedAclChangeSets()
clearProcessedAclChangeSets in interface InformationServerpublic boolean putModel(org.alfresco.repo.dictionary.M2Model model)
putModel in interface InformationServerpublic void rollback()
throws IOException
rollback in interface InformationServerIOExceptionpublic void registerTrackerThread()
registerTrackerThread in interface InformationServerpublic void unregisterTrackerThread()
unregisterTrackerThread in interface InformationServerpublic void reindexNodeByQuery(String query) throws IOException, org.alfresco.httpclient.AuthenticationException, org.json.JSONException
reindexNodeByQuery in interface InformationServerIOExceptionorg.alfresco.httpclient.AuthenticationExceptionorg.json.JSONExceptionpublic String getBaseUrl()
getBaseUrl in interface InformationServerpublic int getPort()
getPort in interface InformationServerpublic String getHostName()
getHostName in interface InformationServerpublic void setCleanContentTxnFloor(long cleanContentTxnFloor)
setCleanContentTxnFloor in interface InformationServerpublic void setCleanCascadeTxnFloor(long cleanCascadeTxnFloor)
setCleanCascadeTxnFloor in interface InformationServerpublic SolrContentStore getSolrContentStore()
public Properties getProps()
Copyright © 2005–2018 Alfresco Software. All rights reserved.