public class SolrIndexClient extends Object implements IndexClient
| Modifier and Type | Class and Description |
|---|---|
static interface |
SolrIndexClient.AfterFeedingCallback |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
serviceProperties |
| Constructor and Description |
|---|
SolrIndexClient(String format,
String layout,
String interpretation,
Map<String,String> serviceProperties,
SolrIndexQueryFactory indexQueryFactory,
QueryResponseFactory<org.apache.solr.client.solrj.response.QueryResponse> queryResponseFactory,
SolrTypeBasedCqlValueTransformerMapFactory tMapFactory)
The Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<BrowseEntry> |
browse(String query,
List<String> browseFields,
int max) |
List<BrowseEntry> |
browse(String query,
List<String> browseFields,
int max,
List<String> filterQuery) |
void |
close() |
org.apache.solr.client.solrj.response.UpdateResponse |
commit() |
int |
count(String query) |
long |
delete(String query)
Do delete.
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteByQuery(String query) |
int |
feed(List<org.apache.solr.common.SolrInputDocument> document) |
void |
feed(List<org.apache.solr.common.SolrInputDocument> docs,
SolrIndexClient.AfterFeedingCallback callback) |
void |
feed(List<org.apache.solr.common.SolrInputDocument> docs,
SolrIndexClient.AfterFeedingCallback callback,
boolean commit) |
int |
feed(org.apache.solr.common.SolrInputDocument document) |
int |
feed(org.apache.solr.common.SolrInputDocument document,
boolean commit) |
int |
feed(String record,
String indexDsId,
eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord) |
int |
feed(String record,
String indexDsId,
eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord,
boolean commit) |
org.apache.solr.client.solrj.SolrClient |
getClient()
Gets the client.
|
eu.dnetlib.functionality.cql.CqlValueTransformerMap |
getCqlValueTransformerMap(MetadataReference mdRef) |
String |
getFormat()
Gets the format.
|
IndexQueryFactory |
getIndexQueryFactory() |
String |
getInterpretation()
Gets the interpretation.
|
String |
getLayout()
Gets the layout.
|
Map<String,String> |
getServiceProperties() |
boolean |
isRecordIndexed(String id) |
LookupResponse |
lookup(String query,
List<String> filterQuery,
int from,
int to) |
org.apache.solr.common.SolrInputDocument |
prepareSolrDocument(String record,
String indexDsId,
eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord) |
org.apache.solr.client.solrj.response.QueryResponse |
query(String query,
Integer rows) |
int |
remove(String id) |
int |
remove(String id,
boolean commit) |
void |
setClient(org.apache.solr.client.solrj.impl.CloudSolrClient client)
Sets the client.
|
void |
setFormat(String format)
Sets the format.
|
void |
setInterpretation(String interpretation)
Sets the interpretation.
|
void |
setLayout(String layout)
Sets the layout.
|
void |
setServiceProperties(Map<String,String> serviceProperties) |
public SolrIndexClient(String format, String layout, String interpretation, Map<String,String> serviceProperties, SolrIndexQueryFactory indexQueryFactory, QueryResponseFactory<org.apache.solr.client.solrj.response.QueryResponse> queryResponseFactory, SolrTypeBasedCqlValueTransformerMapFactory tMapFactory)
format - the formatlayout - the layoutinterpretation - the interpretationserviceProperties - the service propertiestMapFactory - public long delete(String query) throws IndexClientException
delete in interface IndexClientquery - the CQL queryeu.dnetlib.data.provision.index.rmi.IndexServiceException - the index service exceptionIndexClientExceptionpublic List<BrowseEntry> browse(String query, List<String> browseFields, int max) throws IndexClientException
browse in interface IndexClientIndexClientExceptionIndexClient.browse(String, List, int)public List<BrowseEntry> browse(String query, List<String> browseFields, int max, List<String> filterQuery) throws IndexClientException
browse in interface IndexClientIndexClientExceptionIndexClient.browse(String, List, int, List)public org.apache.solr.client.solrj.SolrClient getClient()
throws IndexClientException
IndexClientException - the index client exceptionpublic void setClient(org.apache.solr.client.solrj.impl.CloudSolrClient client)
client - the clientpublic LookupResponse lookup(String query, List<String> filterQuery, int from, int to) throws IndexClientException
lookup in interface IndexClientIndexClientExceptionpublic eu.dnetlib.functionality.cql.CqlValueTransformerMap getCqlValueTransformerMap(MetadataReference mdRef) throws IndexClientException
getCqlValueTransformerMap in interface IndexClientIndexClientExceptionpublic IndexQueryFactory getIndexQueryFactory()
getIndexQueryFactory in interface IndexClientpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic int feed(String record, String indexDsId, eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord) throws IndexClientException
IndexClientExceptionpublic int feed(String record, String indexDsId, eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord, boolean commit) throws IndexClientException
IndexClientExceptionpublic int feed(org.apache.solr.common.SolrInputDocument document)
throws IndexClientException
IndexClientExceptionpublic int feed(List<org.apache.solr.common.SolrInputDocument> document) throws IndexClientException
IndexClientExceptionpublic int feed(org.apache.solr.common.SolrInputDocument document,
boolean commit)
throws IndexClientException
IndexClientExceptionpublic void feed(List<org.apache.solr.common.SolrInputDocument> docs, SolrIndexClient.AfterFeedingCallback callback) throws IndexClientException
IndexClientExceptionpublic void feed(List<org.apache.solr.common.SolrInputDocument> docs, SolrIndexClient.AfterFeedingCallback callback, boolean commit) throws IndexClientException
IndexClientExceptionpublic org.apache.solr.common.SolrInputDocument prepareSolrDocument(String record, String indexDsId, eu.dnetlib.miscutils.functional.UnaryFunction<String,String> toIndexRecord) throws IndexClientException
IndexClientExceptionpublic boolean isRecordIndexed(String id) throws IndexClientException
IndexClientExceptionpublic int remove(String id) throws IndexClientException
IndexClientExceptionpublic org.apache.solr.client.solrj.response.UpdateResponse commit()
throws IndexClientException
IndexClientExceptionpublic int remove(String id, boolean commit) throws IndexClientException
IndexClientExceptionpublic int count(String query) throws IndexClientException
IndexClientExceptionpublic org.apache.solr.client.solrj.response.QueryResponse query(String query, Integer rows) throws IndexClientException
IndexClientExceptionpublic org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String query) throws IndexClientException
IndexClientExceptionpublic String getFormat()
public void setFormat(String format)
format - the formatpublic String getLayout()
public void setLayout(String layout)
layout - the layoutpublic String getInterpretation()
public void setInterpretation(String interpretation)
interpretation - the interpretationpublic Map<String,String> getServiceProperties()
getServiceProperties in interface IndexClientCopyright © 2019. All rights reserved.