Package org.dspace.authority
Class AuthoritySolrServiceImpl
java.lang.Object
org.dspace.authority.AuthoritySolrServiceImpl
- All Implemented Interfaces:
AuthoritySearchService,AuthorityIndexingService
public class AuthoritySolrServiceImpl
extends Object
implements AuthorityIndexingService, AuthoritySearchService
- Author:
- Antoine Snyers (antoine at atmire.com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.solr.client.solrj.SolrClientNon-Static CommonsHttpSolrServer for processing indexing events. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcommit()Retrieves all the metadata fields which are indexed in the authority controlorg.apache.solr.client.solrj.SolrClientgetSolr()voidindexContent(AuthorityValue value) booleanorg.apache.solr.client.solrj.response.QueryResponsesearch(org.apache.solr.client.solrj.SolrQuery query) protected voidwriteDocument(org.apache.solr.common.SolrInputDocument doc) Write the document to the solr index
-
Field Details
-
solr
protected org.apache.solr.client.solrj.SolrClient solrNon-Static CommonsHttpSolrServer for processing indexing events.
-
-
Constructor Details
-
AuthoritySolrServiceImpl
protected AuthoritySolrServiceImpl()
-
-
Method Details
-
getSolr
public org.apache.solr.client.solrj.SolrClient getSolr() throws MalformedURLException, org.apache.solr.client.solrj.SolrServerException, IOException- Throws:
MalformedURLExceptionorg.apache.solr.client.solrj.SolrServerExceptionIOException
-
indexContent
- Specified by:
indexContentin interfaceAuthorityIndexingService
-
cleanIndex
- Specified by:
cleanIndexin interfaceAuthorityIndexingService- Throws:
Exception
-
commit
public void commit()- Specified by:
commitin interfaceAuthorityIndexingService
-
isConfiguredProperly
public boolean isConfiguredProperly()- Specified by:
isConfiguredProperlyin interfaceAuthorityIndexingService
-
writeDocument
Write the document to the solr index- Parameters:
doc- the solr document- Throws:
IOException- if IO error
-
search
public org.apache.solr.client.solrj.response.QueryResponse search(org.apache.solr.client.solrj.SolrQuery query) throws org.apache.solr.client.solrj.SolrServerException, MalformedURLException, IOException - Specified by:
searchin interfaceAuthoritySearchService- Throws:
org.apache.solr.client.solrj.SolrServerExceptionMalformedURLExceptionIOException
-
getAllIndexedMetadataFields
Retrieves all the metadata fields which are indexed in the authority control- Specified by:
getAllIndexedMetadataFieldsin interfaceAuthoritySearchService- Returns:
- a list of metadata fields
- Throws:
Exception- if error
-