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(org.apache.solr.client.solrj.SolrClient solrClient,
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 collection)
Send commit command
SolrClient.commit() |
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 collection,
SolrDataQuery query)
return number of elements found by for given query
|
long |
count(String collection,
SolrDataQuery query,
RequestMethod method)
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 from the default collection.
|
org.apache.solr.client.solrj.response.UpdateResponse |
delete(String collection,
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 from the default collection.
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String id)
Detele the one object with provided id from the default collection.
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String collection,
Collection<String> ids)
Delete objects with given ids
|
org.apache.solr.client.solrj.response.UpdateResponse |
deleteById(String collection,
String id)
Detele the one object with provided id.
|
<T> T |
execute(SolrCallback<T> action)
Execute action within callback
|
<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 collection,
Collection<? extends Serializable> ids,
Class<T> clazz)
Executes a realtime get using given ids.
|
<T> T |
getById(String collection,
Serializable id,
Class<T> clazz)
Executes a realtime get 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
|
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 collection,
Query query,
Class<T> clazz)
Execute the query against Solr and return result as page.
|
<T,S extends Page<T>> |
query(String collection,
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> Cursor<T> |
queryForCursor(String collection,
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 collection,
FacetAndHighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result
|
<T> FacetAndHighlightPage<T> |
queryForFacetAndHighlightPage(String collection,
FacetAndHighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query 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 collection,
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(String collection,
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> 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 collection,
Query query,
Class<T> clazz)
Execute the query against solr and return result as
GroupPage |
<T> GroupPage<T> |
queryForGroupPage(String collection,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr 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 collection,
HighlightQuery query,
Class<T> clazz)
Execute a query and highlight matches in result
|
<T> HighlightPage<T> |
queryForHighlightPage(String collection,
HighlightQuery query,
Class<T> clazz,
RequestMethod method)
Execute a query and highlight matches in result
|
<T> Optional<T> |
queryForObject(Query query,
Class<T> clazz)
Execute the query against solr and return the first returned object
|
<T> Optional<T> |
queryForObject(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and return the first returned object
|
<T> Optional<T> |
queryForObject(String collection,
Query query,
Class<T> clazz)
Execute the query against solr and return the first returned object
|
<T> Optional<T> |
queryForObject(String collection,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and return the first returned object
|
<T> ScoredPage<T> |
queryForPage(Query query,
Class<T> clazz)
Execute the query against solr and retrun result as
Page |
<T> ScoredPage<T> |
queryForPage(Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and retrun result as
Page |
<T> ScoredPage<T> |
queryForPage(String collection,
Query query,
Class<T> clazz)
Execute the query against solr and retrun result as
Page |
<T> ScoredPage<T> |
queryForPage(String collection,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against solr and retrun 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 collection,
Query query,
Class<T> clazz)
Execute the query against Solr and return result as
StatsPage . |
<T> StatsPage<T> |
queryForStatsPage(String collection,
Query query,
Class<T> clazz,
RequestMethod method)
Execute the query against Solr and return result as
StatsPage . |
TermsPage |
queryForTermsPage(String collection,
TermsQuery query)
Execute query using terms handler
|
TermsPage |
queryForTermsPage(String collection,
TermsQuery query,
RequestMethod method)
Execute query using terms handler
|
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 collection)
send rollback command
SolrClient.rollback() |
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(Object obj)
Execute add operation against solr, which will do either insert or update into the default collection.
|
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 collection,
Object obj)
Execute add operation against solr, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBean(String collection,
Object obj,
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 in the default collection.
|
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 in the default collection with support for
commitWithin strategy.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(String collection,
Collection<?> beans)
Add a collection of beans to solr, which will do either insert or update.
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveBeans(String collection,
Collection<?> beans,
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 in the default collection with support
for commitWithin strategy
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocument(String collection,
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(String collection,
org.apache.solr.common.SolrInputDocument document,
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
|
org.apache.solr.client.solrj.response.UpdateResponse |
saveDocuments(String collection,
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(String collection,
Collection<org.apache.solr.common.SolrInputDocument> documents,
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 |
setMappingContext(MappingContext<? extends SolrPersistentEntity<?>,SolrPersistentProperty> mappingContext) |
void |
setSchemaCreationFeatures(Collection<SolrPersistentEntitySchemaCreator.Feature> schemaCreationFeatures) |
void |
setSolrConverter(SolrConverter solrConverter) |
void |
softCommit()
Send soft commmit command
SolrClient.commit(boolean, boolean, boolean) |
void |
softCommit(String collection)
Send soft commmit command
SolrClient.commit(boolean, boolean, boolean) |
public SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient)
public SolrTemplate(org.apache.solr.client.solrj.SolrClient solrClient, RequestMethod requestMethod)
public SolrTemplate(SolrClientFactory solrClientFactory)
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.GET
public <T> T execute(SolrCallback<T> action)
SolrOperations
execute
in interface SolrOperations
public org.apache.solr.client.solrj.response.SolrPingResponse ping()
SolrOperations
ping
in interface SolrOperations
public long count(SolrDataQuery query)
SolrOperations
count
in interface SolrOperations
query
- must not be null.public long count(SolrDataQuery query, RequestMethod method)
SolrOperations
count
in interface SolrOperations
query
- must not be null.method
- must not be null.public long count(String collection, SolrDataQuery query)
SolrOperations
count
in interface SolrOperations
collection
- must not be null.query
- must not be null.public long count(String collection, SolrDataQuery query, RequestMethod method)
SolrOperations
count
in interface SolrOperations
collection
- 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)
SolrOperations
saveBean
in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collection, Object obj)
SolrOperations
saveBean
in interface SolrOperations
collection
- must not be null.obj
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collection, Object obj, int commitWithinMs)
SolrOperations
saveBean
in interface SolrOperations
collection
- must not be null.obj
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object objectToAdd, int commitWithinMs)
SolrOperations
saveBean
in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beans)
SolrOperations
saveBeans
in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collection, Collection<?> beans)
SolrOperations
saveBeans
in interface SolrOperations
collection
- must not be null.beans
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collection, Collection<?> beans, int commitWithinMs)
SolrOperations
saveBeans
in interface SolrOperations
collection
- must not be null.beans
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beansToAdd, int commitWithinMs)
SolrOperations
saveBeans
in interface SolrOperations
public 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(String collection, org.apache.solr.common.SolrInputDocument document)
SolrOperations
saveDocument
in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(String collection, org.apache.solr.common.SolrInputDocument document, int commitWithinMs)
SolrOperations
saveDocument
in interface SolrOperations
document
- must not be null.commitWithinMs
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument documentToAdd, int commitWithinMs)
SolrOperations
saveDocument
in interface SolrOperations
public 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(String collection, Collection<org.apache.solr.common.SolrInputDocument> documents)
SolrOperations
saveDocuments
in interface SolrOperations
collection
- must not be null.documents
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(String collection, Collection<org.apache.solr.common.SolrInputDocument> documents, int commitWithinMs)
SolrOperations
saveDocuments
in interface SolrOperations
collection
- 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)
SolrOperations
saveDocuments
in interface SolrOperations
public org.apache.solr.client.solrj.response.UpdateResponse delete(SolrDataQuery query)
SolrOperations
delete
in interface SolrOperations
query
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse delete(String collection, SolrDataQuery query)
SolrOperations
delete
in interface SolrOperations
collection
- must not be null.query
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id)
SolrOperations
deleteById
in interface SolrOperations
id
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id)
SolrOperations
deleteById
in interface SolrOperations
collection
- must not be null.id
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(Collection<String> ids)
SolrOperations
deleteById
in interface SolrOperations
ids
- must not be null.public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, Collection<String> ids)
SolrOperations
deleteById
in interface SolrOperations
collection
- must not be null.ids
- must not be null.public <T> Optional<T> queryForObject(Query query, Class<T> clazz)
SolrOperations
queryForObject
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> Optional<T> queryForObject(String collection, Query query, Class<T> clazz)
SolrOperations
queryForObject
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> Optional<T> queryForObject(String collection, Query query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForObject
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> Optional<T> queryForObject(Query query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForObject
in interface SolrOperations
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)
SolrOperations
Page
queryForPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> ScoredPage<T> queryForPage(String collection, Query query, Class<T> clazz)
SolrOperations
Page
queryForPage
in interface SolrOperations
collection
- 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)
SolrOperations
query
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T,S extends Page<T>> S query(String collection, Query query, Class<T> clazz)
SolrOperations
query
in interface SolrOperations
collection
- 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)
SolrOperations
query
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T,S extends Page<T>> S query(String collection, Query query, Class<T> clazz, RequestMethod method)
SolrOperations
query
in interface SolrOperations
collection
- 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)
SolrOperations
Page
queryForPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> ScoredPage<T> queryForPage(String collection, Query query, Class<T> clazz, RequestMethod method)
SolrOperations
Page
queryForPage
in interface SolrOperations
collection
- 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)
SolrOperations
GroupPage
queryForGroupPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> GroupPage<T> queryForGroupPage(String collection, Query query, Class<T> clazz)
SolrOperations
GroupPage
queryForGroupPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> GroupPage<T> queryForGroupPage(Query query, Class<T> clazz, RequestMethod method)
SolrOperations
GroupPage
queryForGroupPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> GroupPage<T> queryForGroupPage(String collection, Query query, Class<T> clazz, RequestMethod method)
SolrOperations
GroupPage
queryForGroupPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz)
SolrOperations
StatsPage
.queryForStatsPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> StatsPage<T> queryForStatsPage(String collection, Query query, Class<T> clazz)
SolrOperations
StatsPage
.queryForStatsPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz, RequestMethod method)
SolrOperations
StatsPage
.queryForStatsPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> StatsPage<T> queryForStatsPage(String collection, Query query, Class<T> clazz, RequestMethod method)
SolrOperations
StatsPage
.queryForStatsPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz)
SolrOperations
queryForFacetPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> FacetPage<T> queryForFacetPage(String collection, FacetQuery query, Class<T> clazz)
SolrOperations
queryForFacetPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForFacetPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> FacetPage<T> queryForFacetPage(String collection, FacetQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForFacetPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz)
SolrOperations
queryForHighlightPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> HighlightPage<T> queryForHighlightPage(String collection, HighlightQuery query, Class<T> clazz)
SolrOperations
queryForHighlightPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForHighlightPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> HighlightPage<T> queryForHighlightPage(String collection, HighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForHighlightPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz)
SolrOperations
queryForFacetAndHighlightPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collection, FacetAndHighlightQuery query, Class<T> clazz)
SolrOperations
queryForFacetAndHighlightPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForFacetAndHighlightPage
in interface SolrOperations
query
- must not be null.clazz
- must not be null.method
- must not be null.public <T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collection, FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
SolrOperations
queryForFacetAndHighlightPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.public TermsPage queryForTermsPage(TermsQuery query)
SolrOperations
queryForTermsPage
in interface SolrOperations
query
- must not be null.public TermsPage queryForTermsPage(String collection, TermsQuery query)
SolrOperations
queryForTermsPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.public TermsPage queryForTermsPage(TermsQuery query, RequestMethod method)
SolrOperations
queryForTermsPage
in interface SolrOperations
query
- must not be null.method
- must not be null.public TermsPage queryForTermsPage(String collection, TermsQuery query, RequestMethod method)
SolrOperations
queryForTermsPage
in interface SolrOperations
collection
- must not be null.query
- must not be null.method
- must not be null.public void commit()
SolrOperations
SolrClient.commit()
commit
in interface SolrOperations
public void commit(String collection)
SolrOperations
SolrClient.commit()
commit
in interface SolrOperations
public void softCommit()
SolrOperations
SolrClient.commit(boolean, boolean, boolean)
softCommit
in interface SolrOperations
public void softCommit(String collection)
SolrOperations
SolrClient.commit(boolean, boolean, boolean)
softCommit
in interface SolrOperations
public void rollback()
SolrOperations
SolrClient.rollback()
rollback
in interface SolrOperations
public void rollback(String collection)
SolrOperations
SolrClient.rollback()
rollback
in interface SolrOperations
public org.apache.solr.common.SolrInputDocument convertBeanToSolrInputDocument(Object bean)
SolrOperations
convertBeanToSolrInputDocument
in interface SolrOperations
public String getSchemaName(String collectionName)
collectionName
- public <T> Cursor<T> queryForCursor(Query query, Class<T> clazz)
SolrOperations
Query
and returns an open Cursor
allowing to iterate of results, dynamically
fetching additional ones if required.queryForCursor
in interface SolrOperations
query
- must not be null.clazz
- must not be null.public <T> Cursor<T> queryForCursor(String collection, Query query, Class<T> clazz)
SolrOperations
Query
and returns an open Cursor
allowing to iterate of results, dynamically
fetching additional ones if required.queryForCursor
in interface SolrOperations
collection
- must not be null.query
- must not be null.clazz
- must not be null.public <T> Collection<T> getById(Collection<? extends Serializable> ids, Class<T> clazz)
SolrOperations
getById
in interface SolrOperations
ids
- must not be null.clazz
- must not be null.public <T> Collection<T> getById(String collection, Collection<? extends Serializable> ids, Class<T> clazz)
SolrOperations
getById
in interface SolrOperations
collection
- must not be null.ids
- must not be null.clazz
- must not be null.public <T> T getById(Serializable id, Class<T> clazz)
SolrOperations
getById
in interface SolrOperations
id
- must not be null.clazz
- must not be null.public <T> T getById(String collection, Serializable id, Class<T> clazz)
SolrOperations
getById
in interface SolrOperations
collection
- must not be null.id
- must not be null.clazz
- must not be null.public SchemaOperations getSchemaOperations(String collection)
SolrOperations
SchemaOperations
executable.getSchemaOperations
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.SolrClient getSolrClient()
SolrOperations
getSolrClient
in interface SolrOperations
public SolrConverter getConverter()
getConverter
in interface SolrOperations
public 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 void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public 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–2017 Pivotal Software, Inc.. All rights reserved.