public interface SolrOperations
Modifier and Type | Method and Description |
---|---|
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
|
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> id)
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> id)
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() |
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 |
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 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 |
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<?> beans,
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 document,
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> documents,
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 |
softCommit()
Send soft commmit command
SolrClient.commit(boolean, boolean, boolean) |
void |
softCommit(String collection)
Send soft commmit command
SolrClient.commit(boolean, boolean, boolean) |
org.apache.solr.client.solrj.SolrClient getSolrClient()
org.apache.solr.client.solrj.response.SolrPingResponse ping()
long count(SolrDataQuery query)
query
- must not be null.long count(String collection, SolrDataQuery query)
collection
- must not be null.query
- must not be null.long count(SolrDataQuery query, RequestMethod method)
query
- must not be null.method
- must not be null.long count(String collection, SolrDataQuery query, RequestMethod method)
collection
- must not be null.query
- must not be null.method
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object obj)
obj
- org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collection, Object obj)
collection
- must not be null.obj
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse saveBean(Object obj, int commitWithinMs)
obj
- commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveBean(String collection, Object obj, int commitWithinMs)
collection
- must not be null.obj
- must not be null.commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beans)
beans
- org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collection, Collection<?> beans)
collection
- must not be null.beans
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse saveBeans(Collection<?> beans, int commitWithinMs)
beans
- commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveBeans(String collection, Collection<?> beans, int commitWithinMs)
collection
- must not be null.beans
- must not be null.commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument document)
document
- org.apache.solr.client.solrj.response.UpdateResponse saveDocument(String collection, org.apache.solr.common.SolrInputDocument document)
document
- org.apache.solr.client.solrj.response.UpdateResponse saveDocument(org.apache.solr.common.SolrInputDocument document, int commitWithinMs)
document
- commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveDocument(String collection, org.apache.solr.common.SolrInputDocument document, int commitWithinMs)
document
- must not be null.commitWithinMs
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documents)
documents
- org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(String collection, Collection<org.apache.solr.common.SolrInputDocument> documents)
collection
- must not be null.documents
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(Collection<org.apache.solr.common.SolrInputDocument> documents, int commitWithinMs)
documents
- commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse saveDocuments(String collection, Collection<org.apache.solr.common.SolrInputDocument> documents, int commitWithinMs)
collection
- must not be null.documents
- must not be null.commitWithinMs
- org.apache.solr.client.solrj.response.UpdateResponse delete(SolrDataQuery query)
query
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse delete(String collection, SolrDataQuery query)
collection
- must not be null.query
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id)
id
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id)
collection
- must not be null.id
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse deleteById(Collection<String> id)
id
- must not be null.org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, Collection<String> id)
collection
- must not be null.id
- must not be null.<T> Optional<T> queryForObject(Query query, Class<T> clazz)
query
- must not be null.clazz
- must not be null.<T> Optional<T> queryForObject(String collection, Query query, Class<T> clazz)
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> Optional<T> queryForObject(Query query, Class<T> clazz, RequestMethod method)
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> Optional<T> queryForObject(String collection, Query query, Class<T> clazz, RequestMethod method)
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> ScoredPage<T> queryForPage(Query query, Class<T> clazz)
Page
query
- must not be null.clazz
- must not be null.<T> ScoredPage<T> queryForPage(String collection, Query query, Class<T> clazz)
Page
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> ScoredPage<T> queryForPage(Query query, Class<T> clazz, RequestMethod method)
Page
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> ScoredPage<T> queryForPage(String collection, Query query, Class<T> clazz, RequestMethod method)
Page
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz)
query
- must not be null.clazz
- must not be null.<T> FacetPage<T> queryForFacetPage(String collection, FacetQuery query, Class<T> clazz)
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> FacetPage<T> queryForFacetPage(FacetQuery query, Class<T> clazz, RequestMethod method)
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> FacetPage<T> queryForFacetPage(String collection, FacetQuery query, Class<T> clazz, RequestMethod method)
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz)
query
- must not be null.clazz
- must not be null.<T> HighlightPage<T> queryForHighlightPage(String collection, HighlightQuery query, Class<T> clazz)
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> HighlightPage<T> queryForHighlightPage(HighlightQuery query, Class<T> clazz, RequestMethod method)
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> HighlightPage<T> queryForHighlightPage(String collection, HighlightQuery query, Class<T> clazz, RequestMethod method)
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz)
query
- must not be null.clazz
- must not be null.<T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collection, FacetAndHighlightQuery query, Class<T> clazz)
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> FacetAndHighlightPage<T> queryForFacetAndHighlightPage(String collection, FacetAndHighlightQuery query, Class<T> clazz, RequestMethod method)
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.TermsPage queryForTermsPage(TermsQuery query)
query
- must not be null.TermsPage queryForTermsPage(String collection, TermsQuery query)
collection
- must not be null.query
- must not be null.TermsPage queryForTermsPage(TermsQuery query, RequestMethod method)
query
- must not be null.method
- must not be null.TermsPage queryForTermsPage(String collection, TermsQuery query, RequestMethod method)
collection
- must not be null.query
- must not be null.method
- must not be null.<T> Cursor<T> queryForCursor(Query query, Class<T> clazz)
Query
and returns an open Cursor
allowing to iterate of results, dynamically
fetching additional ones if required.query
- must not be null.clazz
- must not be null.<T> Cursor<T> queryForCursor(String collection, Query query, Class<T> clazz)
Query
and returns an open Cursor
allowing to iterate of results, dynamically
fetching additional ones if required.collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> GroupPage<T> queryForGroupPage(Query query, Class<T> clazz)
GroupPage
query
- must not be null.clazz
- must not be null.<T> GroupPage<T> queryForGroupPage(String collection, Query query, Class<T> clazz)
GroupPage
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> GroupPage<T> queryForGroupPage(Query query, Class<T> clazz, RequestMethod method)
GroupPage
query
- must not be null.clazz
- must not be null.method
- must not be null.<T> GroupPage<T> queryForGroupPage(String collection, Query query, Class<T> clazz, RequestMethod method)
GroupPage
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz)
StatsPage
.query
- must not be null.clazz
- must not be null.<T> StatsPage<T> queryForStatsPage(String collection, Query query, Class<T> clazz)
StatsPage
.collection
- must not be null.query
- must not be null.clazz
- must not be null.<T> StatsPage<T> queryForStatsPage(Query query, Class<T> clazz, RequestMethod method)
StatsPage
.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> StatsPage<T> queryForStatsPage(String collection, Query query, Class<T> clazz, RequestMethod method)
StatsPage
.collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T,S extends Page<T>> S query(Query query, Class<T> clazz)
query
- must not be null.clazz
- must not be null.<T,S extends Page<T>> S query(String collection, Query query, Class<T> clazz)
collection
- must not be null.query
- must not be null.clazz
- must not be null.<T,S extends Page<T>> S query(Query query, Class<T> clazz, RequestMethod method)
query
- must not be null.clazz
- must not be null.method
- must not be null.<T,S extends Page<T>> S query(String collection, Query query, Class<T> clazz, RequestMethod method)
collection
- must not be null.query
- must not be null.clazz
- must not be null.method
- must not be null.<T> T getById(Serializable id, Class<T> clazz)
id
- must not be null.clazz
- must not be null.<T> T getById(String collection, Serializable id, Class<T> clazz)
collection
- must not be null.id
- must not be null.clazz
- must not be null.<T> Collection<T> getById(Collection<? extends Serializable> ids, Class<T> clazz)
ids
- must not be null.clazz
- must not be null.<T> Collection<T> getById(String collection, Collection<? extends Serializable> ids, Class<T> clazz)
collection
- must not be null.ids
- must not be null.clazz
- must not be null.void commit()
SolrClient.commit()
void commit(String collection)
SolrClient.commit()
void softCommit()
SolrClient.commit(boolean, boolean, boolean)
void softCommit(String collection)
SolrClient.commit(boolean, boolean, boolean)
void rollback()
SolrClient.rollback()
void rollback(String collection)
SolrClient.rollback()
org.apache.solr.common.SolrInputDocument convertBeanToSolrInputDocument(Object bean)
bean
- SolrConverter getConverter()
<T> T execute(SolrCallback<T> action)
action
- SchemaOperations getSchemaOperations(String collection)
SchemaOperations
executable.collection
- Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.