|
Spring Data Solr | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.solr.core.SolrTemplate
public class SolrTemplate
Implementation of SolrOperations
| Constructor Summary | |
|---|---|
SolrTemplate(org.apache.solr.client.solrj.SolrServer solrServer)
|
|
SolrTemplate(SolrServerFactory solrServerFactory)
|
|
SolrTemplate(SolrServerFactory solrServerFactory,
SolrConverter solrConverter)
|
|
SolrTemplate(org.apache.solr.client.solrj.SolrServer solrServer,
String core)
|
|
| Method Summary | ||
|---|---|---|
void |
afterPropertiesSet()
|
|
protected void |
assertNoCollection(Object o)
|
|
void |
commit()
Send commit command SolrServer.commit() |
|
org.apache.solr.common.SolrInputDocument |
convertBeanToSolrInputDocument(Object bean)
Convert given bean into a solrj InputDocument |
|
|
convertQueryResponseToBeans(org.apache.solr.client.solrj.response.QueryResponse response,
Class<T> targetClass)
|
|
|
convertSolrDocumentListToBeans(org.apache.solr.common.SolrDocumentList documents,
Class<T> targetClass)
|
|
|
convertSolrDocumentToBean(org.apache.solr.common.SolrDocument document,
Class<T> targetClass)
|
|
long |
count(SolrDataQuery query)
return number of elements found 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 |
deleteById(Collection<String> ids)
Delete objects with given ids |
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String id)
Detele the one object with provided id |
|
|
execute(SolrCallback<T> action)
Execute action within callback |
|
SolrConverter |
getConverter()
|
|
static PersistenceExceptionTranslator |
getExceptionTranslator()
|
|
String |
getSolrCore()
|
|
org.apache.solr.client.solrj.SolrServer |
getSolrServer()
Get the underlying SolrServer instance |
|
org.apache.solr.client.solrj.response.SolrPingResponse |
ping()
Execute ping against solrServer and return duration in msec |
|
|
queryForFacetPage(FacetQuery query,
Class<T> clazz)
Execute a facet query against solr facet result will be returned along with query result within the FacetPage |
|
|
queryForHighlightPage(HighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result |
|
|
queryForObject(Query query,
Class<T> clazz)
Execute the query against solr and return the first returned object |
|
|
queryForPage(Query query,
Class<T> clazz)
Execute the query against solr and retrun result as Page |
|
TermsPage |
queryForTermsPage(TermsQuery query)
Execute query using terms handler |
|
void |
registerQueryParser(Class<? extends SolrDataQuery> clazz,
QueryParser queryParser)
|
|
void |
rollback()
send rollback command SolrServer.rollback() |
|
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 |
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 |
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 |
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 |
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
|
void |
setSolrConverter(SolrConverter solrConverter)
|
|
void |
setSolrCore(String solrCore)
|
|
void |
softCommit()
Send soft commmit command SolrServer.commit(boolean, boolean, boolean) |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SolrTemplate(org.apache.solr.client.solrj.SolrServer solrServer)
public SolrTemplate(org.apache.solr.client.solrj.SolrServer solrServer,
String core)
public SolrTemplate(SolrServerFactory solrServerFactory)
public SolrTemplate(SolrServerFactory solrServerFactory,
SolrConverter solrConverter)
| Method Detail |
|---|
public <T> T execute(SolrCallback<T> action)
SolrOperations
execute in interface SolrOperationspublic org.apache.solr.client.solrj.response.SolrPingResponse ping()
SolrOperations
ping in interface SolrOperationspublic long count(SolrDataQuery query)
SolrOperations
count in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object obj)
SolrOperations
saveBean in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object objectToAdd,
int commitWithinMs)
SolrOperations
saveBean in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beans)
SolrOperations
saveBeans in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beansToAdd,
int commitWithinMs)
SolrOperations
saveBeans in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument document)
SolrOperations
saveDocument in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument documentToAdd,
int commitWithinMs)
SolrOperations
saveDocument in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documents)
SolrOperations
saveDocuments in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documentsToAdd,
int commitWithinMs)
SolrOperations
saveDocuments in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse delete(SolrDataQuery query)
SolrOperations
delete in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id)
SolrOperations
deleteById in interface SolrOperationspublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(Collection<String> ids)
SolrOperations
deleteById in interface SolrOperations
public <T> T queryForObject(Query query,
Class<T> clazz)
SolrOperations
queryForObject in interface SolrOperations
public <T> Page<T> queryForPage(Query query,
Class<T> clazz)
SolrOperationsPage
queryForPage in interface SolrOperations
public <T> FacetPage<T> queryForFacetPage(FacetQuery query,
Class<T> clazz)
SolrOperations
queryForFacetPage in interface SolrOperations
public <T> HighlightPage<T> queryForHighlightPage(HighlightQuery query,
Class<T> clazz)
SolrOperations
queryForHighlightPage in interface SolrOperationspublic TermsPage queryForTermsPage(TermsQuery query)
SolrOperations
queryForTermsPage in interface SolrOperationspublic void commit()
SolrOperationsSolrServer.commit()
commit in interface SolrOperationspublic void softCommit()
SolrOperationsSolrServer.commit(boolean, boolean, boolean)
softCommit in interface SolrOperationspublic void rollback()
SolrOperationsSolrServer.rollback()
rollback in interface SolrOperationspublic org.apache.solr.common.SolrInputDocument convertBeanToSolrInputDocument(Object bean)
SolrOperations
convertBeanToSolrInputDocument in interface SolrOperations
public <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.SolrServer getSolrServer()
SolrOperations
getSolrServer in interface SolrOperationspublic SolrConverter getConverter()
getConverter in interface SolrOperationspublic static PersistenceExceptionTranslator getExceptionTranslator()
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext in interface ApplicationContextAware
public 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 InitializingBean
|
Spring Data Solr | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||