public class SolrTemplate extends Object implements SolrOperations, InitializingBean, ApplicationContextAware
SolrOperations| Constructor and Description |
|---|
SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient) |
SolrTemplate(SolrClientFactory solrClientFactory) |
SolrTemplate(SolrClientFactory solrClientFactory,
RequestMethod requestMethod) |
SolrTemplate(SolrClientFactory solrClientFactory,
SolrConverter solrConverter) |
SolrTemplate(SolrClientFactory solrClientFactory,
SolrConverter solrConverter,
RequestMethod defaultRequestMethod) |
SolrTemplate(SolrClientFactory solrClientFactory,
String defaultCore) |
SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient,
String core) |
SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient,
String core,
RequestMethod requestMethod) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
assertNoCollection(Object o) |
void |
commit()
Send commit command
SolrClient.commit() |
void |
commit(String collectionName) |
org.apache.solr.common.SolrInputDocument |
convertBeanToSolrInputDocument(Object bean)
Convert given bean into a solrj InputDocument
|
<T> List<T> |
convertQueryResponseToBeans(org.apache.solr.client.solrj.response.QueryResponse response,
Class<T> targetClass) |
<T> List<T> |
convertSolrDocumentListToBeans(org.apache.solr.common.SolrDocumentList documents,
Class<T> targetClass) |
<T> T |
convertSolrDocumentToBean(org.apache.solr.common.SolrDocument document,
Class<T> targetClass) |
long |
count(SolrDataQuery query)
return number of elements found by for given query
|
long |
count(SolrDataQuery query,
RequestMethod method)
return number of elements found by for given query
|
long |
count(String collectionName,
SolrDataQuery query)
Return number of elements found in given collection by for given query
|
long |
count(String collectionName,
SolrDataQuery query,
RequestMethod method)
Return number of elements found in collection by for given query.
|
org.apache.solr.client.solrj.response.UpdateResponse |
delete(SolrDataQuery query)
Find and delete all objects matching the provided Query
|
org.apache.solr.client.solrj.response.UpdateResponse |
delete(String collectionName,
SolrDataQuery query)
Find and delete all objects matching the provided Query in specific collection.
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(Collection<String> ids)
Delete objects with given ids
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String id)
Delete the one object with provided id
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String collectionName,
Collection<String> ids)
Delete objects with given ids in collection.
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String collectionName,
String id)
Delete the one object with provided id in collection.
|
<T> T |
execute(SolrCallback<T> action)
Execute action within callback
|
<T> T |
execute(String collection,
CollectionCallback<T> action)
Execute action within callback on a given collection.
|
<T> Collection<T> |
getById(Collection<? extends Serializable> ids,
Class<T> clazz)
Executes a realtime get using given ids.
|
<T> T |
getById(Serializable id,
Class<T> clazz)
Executes a realtime get using given id.
|
<T> Collection<T> |
getById(String collectionName,
Collection<? extends Serializable> ids,
Class<T> clazz)
Executes a realtime get on given collection using given ids.
|
<T> T |
getById(String collectionName,
Serializable id,
Class<T> clazz)
Executes a realtime get on given collection using given id.
|
SolrConverter |
getConverter() |
RequestMethod |
getDefaultRequestMethod() |
static PersistenceExceptionTranslator |
getExceptionTranslator() |
Set<SolrPersistentEntitySchemaCreator.Feature> |
getSchemaCreationFeatures() |
String |
getSchemaName(String collectionName) |
SchemaOperations |
getSchemaOperations(String collection)
Get the
SchemaOperations executable. |
org.apache.solr.client.solrj.SolrClient |
getSolrClient()
Get the underlying SolrClient instance
|
String |
getSolrCore() |
org.apache.solr.client.solrj.response.SolrPingResponse |
ping()
Execute ping against SolrClient and return duration in msec
|
<T,S extends Page<T>> |
query(Query query,
Class<T> clazz)
Execute the query against Solr and return result as page.
|
<T,S extends Page<T>> |
query(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against Solr and return result as page.
|
<T,S extends Page<T>> |
query(String collectionName,
Query query,
Class<T> clazz)
Execute the query against Solr and return result as page.
|
<T,S extends Page<T>> |
query(String collectionName,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against Solr and return result as page.
|
<T> Cursor<T> |
queryForCursor(Query query,
Class<T> clazz)
|
<T> FacetAndHighlightPage<T> |
queryForFacetAndHighlightPage(FacetAndHighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result
|
<T> FacetAndHighlightPage<T> |
queryForFacetAndHighlightPage(FacetAndHighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query and highlight matches in result
|
<T> FacetAndHighlightPage<T> |
queryForFacetAndHighlightPage(String collectionName,
FacetAndHighlightQuery query,
Class<T> clazz)
Execute a query against specific collection and highlight matches in result.
|
<T> FacetAndHighlightPage<T> |
queryForFacetAndHighlightPage(String collectionName,
FacetAndHighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query against specific collection and highlight matches in result.
|
<T> FacetPage<T> |
queryForFacetPage(FacetQuery query,
Class<T> clazz)
Execute a facet query against solr facet result will be returned along with query result within the FacetPage
|
<T> FacetPage<T> |
queryForFacetPage(FacetQuery query,
Class<T> clazz,
RequestMethod method)
Execute a facet query against solr facet result will be returned along with query result within the
FacetPage# |
<T> FacetPage<T> |
queryForFacetPage(String collectionName,
FacetQuery query,
Class<T> clazz)
Execute a facet query against specific collection.
|
<T> FacetPage<T> |
queryForFacetPage(String collectionName,
FacetQuery query,
Class<T> clazz,
RequestMethod method)
Execute a facet query against specific collection.
|
<T> GroupPage<T> |
queryForGroupPage(Query query,
Class<T> clazz)
Execute the query against solr and return result as
GroupPage |
<T> GroupPage<T> |
queryForGroupPage(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and return result as
GroupPage. |
<T> GroupPage<T> |
queryForGroupPage(String collectionName,
Query query,
Class<T> clazz)
Execute the query against specific collection and return result as
GroupPage. |
<T> GroupPage<T> |
queryForGroupPage(String collectionName,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against specific collection and return result as
GroupPage |
<T> HighlightPage<T> |
queryForHighlightPage(HighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result
|
<T> HighlightPage<T> |
queryForHighlightPage(HighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query and highlight matches in result.
|
<T> HighlightPage<T> |
queryForHighlightPage(String collectionName,
HighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result within a specific collection.
|
<T> HighlightPage<T> |
queryForHighlightPage(String collectionName,
HighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query and highlight matches in result
|
<T> T |
queryForObject(Query query,
Class<T> clazz)
Execute the query against solr and return the first returned object
|
<T> T |
queryForObject(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and return the first returned object
|
<T> T |
queryForObject(String collectionName,
Query query,
Class<T> clazz)
Execute the query against specific collection and return the first returned object.
|
<T> T |
queryForObject(String collectionName,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against specific collection and return the first returned object.
|
<T> ScoredPage<T> |
queryForPage(Query query,
Class<T> clazz)
Execute the query against solr and return result as
Page. |
<T> ScoredPage<T> |
queryForPage(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and return result as
Page |
<T> ScoredPage<T> |
queryForPage(String collectionName,
Query query,
Class<T> clazz)
Execute the query against specific collection and return result as
Page. |
<T> ScoredPage<T> |
queryForPage(String collectionName,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against specific collection and return result as
Page |
<T> StatsPage<T> |
queryForStatsPage(Query query,
Class<T> clazz)
Execute the query against Solr and return result as
StatsPage. |
<T> StatsPage<T> |
queryForStatsPage(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against Solr and return result as
StatsPage. |
<T> StatsPage<T> |
queryForStatsPage(String collectionName,
Query query,
Class<T> clazz)
Execute the query against specific collection and return result as
StatsPage. |
<T> StatsPage<T> |
queryForStatsPage(String collectionName,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against specific collection and return result as
StatsPage. |
TermsPage |
queryForTermsPage(String collectionName,
TermsQuery query)
Execute query using terms handler against given collection.
|
TermsPage |
queryForTermsPage(String collectionName,
TermsQuery query,
RequestMethod method)
Execute query using terms handler against given collection.
|
TermsPage |
queryForTermsPage(TermsQuery query)
Execute query using terms handler
|
TermsPage |
queryForTermsPage(TermsQuery query,
RequestMethod method)
Execute query using terms handler
|
void |
registerQueryParser(Class<? extends SolrDataQuery> clazz,
QueryParser queryParser) |
void |
rollback()
send rollback command
SolrClient.rollback() |
void |
rollback(String collectionName) |
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(Object obj)
Execute add operation against solr, which will do either insert or update
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(Object objectToAdd,
int commitWithinMs)
Execute add operation against solr, which will do either insert or update with support for commitWithin strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(String collectionName,
Object obj)
Execute add operation against specific collection, which will do either insert or update
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(String collectionName,
Object objectToAdd,
int commitWithinMs)
Execute add operation against specific collection, which will do either insert or update with support for
commitWithin strategy.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(Collection<?> beans)
Add a collection of beans to solr, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(Collection<?> beansToAdd,
int commitWithinMs)
Add a collection of beans to solr, which will do either insert or update with support for commitWithin strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(String collectionName,
Collection<?> beans)
Add a collection of beans to specific collection, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(String collectionName,
Collection<?> beansToAdd,
int commitWithinMs)
Add a collection of beans to specific collection, which will do either insert or update with support for
commitWithin strategy.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocument(org.apache.solr.common.SolrInputDocument document)
Add a solrj input document to solr, which will do either insert or update
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocument(org.apache.solr.common.SolrInputDocument documentToAdd,
int commitWithinMs)
Add a solrj input document to solr, which will do either insert or update with support for commitWithin strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocument(String collectionName,
org.apache.solr.common.SolrInputDocument document)
Add a solrj input document to specific collection, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocument(String collectionName,
org.apache.solr.common.SolrInputDocument documentToAdd,
int commitWithinMs)
Add a solrj input document to specific collection, which will do either insert or update with support for
commitWithin strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documents)
Add multiple solrj input documents to solr, which will do either insert or update
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documentsToAdd,
int commitWithinMs)
Add multiple solrj input documents to solr, which will do either insert or update with support for commitWithin
strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocuments(String collectionName,
Collection<org.apache.solr.common.SolrInputDocument> documents)
Add multiple solrj input documents to specific collection, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocuments(String collectionName,
Collection<org.apache.solr.common.SolrInputDocument> documentsToAdd,
int commitWithinMs)
Add multiple solrj input documents to specific collection, which will do either insert or update with support for
commitWithin strategy.
|
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setMappingContext(MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> mappingContext) |
void |
setSchemaCreationFeatures(Collection<SolrPersistentEntitySchemaCreator.Feature> schemaCreationFeatures) |
void |
setSolrConverter(SolrConverter solrConverter) |
void |
setSolrCore(String solrCore) |
void |
softCommit()
Send soft commmit command
SolrClient.commit(boolean, boolean, boolean) |
void |
softCommit(String collectionName) |
public SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient)
public SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient,
String core)
public SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient,
String core,
RequestMethod requestMethod)
public SolrTemplate(SolrClientFactory solrClientFactory)
public SolrTemplate(SolrClientFactory solrClientFactory, String defaultCore)
solrClientFactory must - not be null.defaultCore - can be null.public SolrTemplate(SolrClientFactory solrClientFactory, RequestMethod requestMethod)
public SolrTemplate(SolrClientFactory solrClientFactory, SolrConverter solrConverter)
public SolrTemplate(SolrClientFactory solrClientFactory, SolrConverter solrConverter, RequestMethod defaultRequestMethod)
solrClientFactory - must not be null.solrConverter - must not be null.defaultRequestMethod - can be null. Will be defaulted to RequestMethod.GETpublic <T> T execute(SolrCallback<T> action)
SolrOperationsexecute in interface SolrOperationspublic <T> T execute(String collection, CollectionCallback<T> action)
SolrOperationsexecute in interface SolrOperationscollection - must not be null.action - must not be null.public org.apache.solr.client.solrj.response.SolrPingResponse ping()
SolrOperationsping in interface SolrOperationspublic long count(SolrDataQuery query)
SolrOperationscount in interface SolrOperationsquery - must not be null.public long count(String collectionName, SolrDataQuery query)
SolrOperationscount in interface SolrOperationscollectionName - must not be null.query - must not be null.public long count(SolrDataQuery query, RequestMethod method)
SolrOperationscount in interface SolrOperationsquery - must not be null.method - must not be null.public long count(String collectionName, SolrDataQuery query, RequestMethod method)
SolrOperationscount in interface SolrOperationscollectionName - must not be null.query - must not be null.method - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object obj)
SolrOperationssaveBean in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collectionName, Object obj)
SolrOperationssaveBean in interface SolrOperationscollectionName - must not be null.obj - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object objectToAdd, int commitWithinMs)
SolrOperationssaveBean in interface SolrOperationsobjectToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collectionName, Object objectToAdd, int commitWithinMs)
SolrOperationssaveBean in interface SolrOperationscollectionName - must not be null.objectToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beans)
SolrOperationssaveBeans in interface SolrOperationsbeans - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collectionName, Collection<?> beans)
SolrOperationssaveBeans in interface SolrOperationscollectionName - must not be null.beans - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beansToAdd, int commitWithinMs)
SolrOperationssaveBeans in interface SolrOperationsbeansToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collectionName, Collection<?> beansToAdd, int commitWithinMs)
SolrOperationssaveBeans in interface SolrOperationscollectionName - must not be null.beansToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument document)
SolrOperationssaveDocument in interface SolrOperationsdocument - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(String collectionName, org.apache.solr.common.SolrInputDocument document)
SolrOperationssaveDocument in interface SolrOperationscollectionName - must not be null.document - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument documentToAdd,
int commitWithinMs)
SolrOperationssaveDocument in interface SolrOperationsdocumentToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(String collectionName, org.apache.solr.common.SolrInputDocument documentToAdd, int commitWithinMs)
SolrOperationssaveDocument in interface SolrOperationscollectionName - must not be null.documentToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documents)
SolrOperationssaveDocuments in interface SolrOperationsdocuments - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(String collectionName, Collection<org.apache.solr.common.SolrInputDocument> documents)
SolrOperationssaveDocuments in interface SolrOperationscollectionName - must not be null.documents - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documentsToAdd, int commitWithinMs)
SolrOperationssaveDocuments in interface SolrOperationsdocumentsToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(String collectionName, Collection<org.apache.solr.common.SolrInputDocument> documentsToAdd, int commitWithinMs)
SolrOperationssaveDocuments in interface SolrOperationscollectionName - must not be null.documentsToAdd - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse delete(SolrDataQuery query)
SolrOperationsdelete in interface SolrOperationsquery - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse delete(String collectionName, SolrDataQuery query)
SolrOperationsdelete in interface SolrOperationscollectionName - must not be null.query - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id)
SolrOperationsdeleteById in interface SolrOperationsid - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collectionName, String id)
SolrOperationsdeleteById in interface SolrOperationscollectionName - must not be null.id - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(Collection<String> ids)
SolrOperationsdeleteById in interface SolrOperationsids - must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collectionName, Collection<String> ids)
SolrOperationsdeleteById in interface SolrOperationscollectionName - must not be null.ids - must not be null.public <T> T queryForObject(Query query, Class<T> clazz)
SolrOperationsqueryForObject in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> T queryForObject(String collectionName, Query query, Class<T> clazz)
SolrOperationsqueryForObject in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.public <T> T queryForObject(Query query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForObject in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> T queryForObject(String collectionName, Query query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForObject in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.method - must not be null.public <T> ScoredPage<T> queryForPage(Query query, Class<T> clazz)
SolrOperationsPage.queryForPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> ScoredPage<T> queryForPage(String collectionName, Query query, Class<T> clazz)
SolrOperationsPage.queryForPage in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.public <T,S extends Page<T>> S query(Query query, Class<T> clazz)
SolrOperationsquery in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T,S extends Page<T>> S query(String collectionName, Query query, Class<T> clazz)
SolrOperationsquery in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.public <T,S extends Page<T>> S query(Query query, Class<T> clazz, RequestMethod method)
SolrOperationsquery in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T,S extends Page<T>> S query(String collectionName, Query query, Class<T> clazz, RequestMethod method)
SolrOperationsquery in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.method - must not be null.public <T> ScoredPage<T> queryForPage(Query query, Class<T> clazz, RequestMethod method)
SolrOperationsPagequeryForPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> ScoredPage<T> queryForPage(String collectionName, Query query, Class<T> clazz, RequestMethod method)
SolrOperationsPagequeryForPage in interface SolrOperationscollectionName - must not be null.query - must not be null.clazz - must not be null.method - must not be null.public <T> GroupPage<T> queryForGroupPage(Query query, Class<T> clazz)
SolrOperationsGroupPagequeryForGroupPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> GroupPage<T> queryForGroupPage(String collectionName, Query query, Class<T> clazz)
SolrOperationsGroupPage.queryForGroupPage in interface SolrOperationspublic <T> GroupPage<T> queryForGroupPage(Query query, Class<T> clazz, RequestMethod method)
SolrOperationsGroupPage.queryForGroupPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> GroupPage<T> queryForGroupPage(String collectionName, Query query, Class<T> clazz, RequestMethod method)
SolrOperationsGroupPagequeryForGroupPage in interface SolrOperationspublic <T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz)
SolrOperationsStatsPage.queryForStatsPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> StatsPage<T> queryForStatsPage(String collectionName, Query query, Class<T> clazz)
SolrOperationsStatsPage.queryForStatsPage in interface SolrOperationspublic <T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz, RequestMethod method)
SolrOperationsStatsPage.queryForStatsPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> StatsPage<T> queryForStatsPage(String collectionName, Query query, Class<T> clazz, RequestMethod method)
SolrOperationsStatsPage.queryForStatsPage in interface SolrOperationspublic <T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz)
SolrOperationsqueryForFacetPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> FacetPage<T> queryForFacetPage(String collectionName, FacetQuery query, Class<T> clazz)
SolrOperationsFacetPage.queryForFacetPage in interface SolrOperationscollectionName - must not be null.query - must not be null.public <T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsFacetPage#queryForFacetPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> FacetPage<T> queryForFacetPage(String collectionName, FacetQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsFacetPage.queryForFacetPage in interface SolrOperationspublic <T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz)
SolrOperationsqueryForHighlightPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> HighlightPage<T> queryForHighlightPage(String collectionName, HighlightQuery query, Class<T> clazz)
SolrOperationsqueryForHighlightPage in interface SolrOperationspublic <T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForHighlightPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> HighlightPage<T> queryForHighlightPage(String collectionName, HighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForHighlightPage in interface SolrOperationspublic <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz)
SolrOperationsqueryForFacetAndHighlightPage in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collectionName, FacetAndHighlightQuery query, Class<T> clazz)
SolrOperationsqueryForFacetAndHighlightPage in interface SolrOperationspublic <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForFacetAndHighlightPage in interface SolrOperationsquery - must not be null.clazz - must not be null.method - must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collectionName, FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperationsqueryForFacetAndHighlightPage in interface SolrOperationspublic TermsPage queryForTermsPage(TermsQuery query)
SolrOperationsqueryForTermsPage in interface SolrOperationsquery - must not be null.public TermsPage queryForTermsPage(String collectionName, TermsQuery query)
SolrOperationsqueryForTermsPage in interface SolrOperationspublic TermsPage queryForTermsPage(TermsQuery query, RequestMethod method)
SolrOperationsqueryForTermsPage in interface SolrOperationsquery - must not be null.method - must not be null.public TermsPage queryForTermsPage(String collectionName, TermsQuery query, RequestMethod method)
SolrOperationsqueryForTermsPage in interface SolrOperationspublic void commit()
SolrOperationsSolrClient.commit()commit in interface SolrOperationspublic void commit(String collectionName)
commit in interface SolrOperationspublic void softCommit()
SolrOperationsSolrClient.commit(boolean, boolean, boolean)softCommit in interface SolrOperationspublic void softCommit(String collectionName)
softCommit in interface SolrOperationspublic void rollback()
SolrOperationsSolrClient.rollback()rollback in interface SolrOperationspublic void rollback(String collectionName)
rollback in interface SolrOperationspublic org.apache.solr.common.SolrInputDocument convertBeanToSolrInputDocument(Object bean)
SolrOperationsconvertBeanToSolrInputDocument in interface SolrOperationspublic String getSchemaName(String collectionName)
collectionName - public <T> Cursor<T> queryForCursor(Query query, Class<T> clazz)
SolrOperationsQuery and returns an open Cursor allowing to iterate of results, dynamically
fetching additional ones if required.queryForCursor in interface SolrOperationsquery - must not be null.clazz - must not be null.public <T> Collection<T> getById(Collection<? extends Serializable> ids, Class<T> clazz)
SolrOperationsgetById in interface SolrOperationsids - must not be null.clazz - must not be null.public <T> Collection<T> getById(String collectionName, Collection<? extends Serializable> ids, Class<T> clazz)
SolrOperationsgetById in interface SolrOperationspublic <T> T getById(Serializable id, Class<T> clazz)
SolrOperationsgetById in interface SolrOperationsid - must not be null.clazz - must not be null.public <T> T getById(String collectionName, Serializable id, Class<T> clazz)
SolrOperationsgetById in interface SolrOperationspublic SchemaOperations getSchemaOperations(String collection)
SolrOperationsSchemaOperations executable.getSchemaOperations in interface SolrOperationspublic <T> List<T> convertQueryResponseToBeans(org.apache.solr.client.solrj.response.QueryResponse response, Class<T> targetClass)
public <T> List<T> convertSolrDocumentListToBeans(org.apache.solr.common.SolrDocumentList documents, Class<T> targetClass)
public <T> T convertSolrDocumentToBean(org.apache.solr.common.SolrDocument document,
Class<T> targetClass)
protected void assertNoCollection(Object o)
public final org.apache.solr.client.solrj.SolrClient getSolrClient()
SolrOperationsgetSolrClient in interface SolrOperationspublic SolrConverter getConverter()
getConverter in interface SolrOperationspublic static PersistenceExceptionTranslator getExceptionTranslator()
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext in interface ApplicationContextAwarepublic void registerQueryParser(Class<? extends SolrDataQuery> clazz, QueryParser queryParser)
public void setSolrConverter(SolrConverter solrConverter)
public String getSolrCore()
public void setSolrCore(String solrCore)
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic void setMappingContext(MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> mappingContext)
mappingContext - public void setSchemaCreationFeatures(Collection<SolrPersistentEntitySchemaCreator.Feature> schemaCreationFeatures)
schemaCreationFeatures - public Set<SolrPersistentEntitySchemaCreator.Feature> getSchemaCreationFeatures()
public RequestMethod getDefaultRequestMethod()
Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.