public abstract class SolrClient extends Object implements Serializable, Closeable
SolrServer
Constructor and Description |
---|
SolrClient() |
Modifier and Type | Method and Description |
---|---|
UpdateResponse |
add(Collection<SolrInputDocument> docs)
Adds a collection of documents
|
UpdateResponse |
add(Collection<SolrInputDocument> docs,
int commitWithinMs)
Adds a collection of documents, specifying max time before they become committed
|
UpdateResponse |
add(Iterator<SolrInputDocument> docIterator)
Adds the documents supplied by the given iterator.
|
UpdateResponse |
add(SolrInputDocument doc)
Adds a single document
|
UpdateResponse |
add(SolrInputDocument doc,
int commitWithinMs)
Adds a single document specifying max time before it becomes committed
|
UpdateResponse |
add(String collection,
Collection<SolrInputDocument> docs)
Adds a collection of documents
|
UpdateResponse |
add(String collection,
Collection<SolrInputDocument> docs,
int commitWithinMs)
Adds a collection of documents, specifying max time before they become committed
|
UpdateResponse |
add(String collection,
Iterator<SolrInputDocument> docIterator)
Adds the documents supplied by the given iterator.
|
UpdateResponse |
add(String collection,
SolrInputDocument doc)
Adds a single document
|
UpdateResponse |
add(String collection,
SolrInputDocument doc,
int commitWithinMs)
Adds a single document specifying max time before it becomes committed
|
UpdateResponse |
addBean(Object obj)
Adds a single bean
The bean is converted to a
SolrInputDocument by the client's
DocumentObjectBinder |
UpdateResponse |
addBean(Object obj,
int commitWithinMs)
Adds a single bean specifying max time before it becomes committed
The bean is converted to a
SolrInputDocument by the client's
DocumentObjectBinder |
UpdateResponse |
addBean(String collection,
Object obj)
Adds a single bean
The bean is converted to a
SolrInputDocument by the client's
DocumentObjectBinder |
UpdateResponse |
addBean(String collection,
Object obj,
int commitWithinMs)
Adds a single bean specifying max time before it becomes committed
The bean is converted to a
SolrInputDocument by the client's
DocumentObjectBinder |
UpdateResponse |
addBeans(Collection<?> beans)
Adds a collection of beans
The beans are converted to
SolrInputDocument s by the client's
DocumentObjectBinder |
UpdateResponse |
addBeans(Collection<?> beans,
int commitWithinMs)
Adds a collection of beans specifying max time before they become committed
The beans are converted to
SolrInputDocument s by the client's
DocumentObjectBinder |
UpdateResponse |
addBeans(Iterator<?> beanIterator)
Adds the beans supplied by the given iterator.
|
UpdateResponse |
addBeans(String collection,
Collection<?> beans)
Adds a collection of beans
The beans are converted to
SolrInputDocument s by the client's
DocumentObjectBinder |
UpdateResponse |
addBeans(String collection,
Collection<?> beans,
int commitWithinMs)
Adds a collection of beans specifying max time before they become committed
The beans are converted to
SolrInputDocument s by the client's
DocumentObjectBinder |
UpdateResponse |
addBeans(String collection,
Iterator<?> beanIterator)
Adds the beans supplied by the given iterator.
|
UpdateResponse |
commit()
Performs an explicit commit, causing pending documents to be committed for indexing
waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access
|
UpdateResponse |
commit(boolean waitFlush,
boolean waitSearcher)
Performs an explicit commit, causing pending documents to be committed for indexing
|
UpdateResponse |
commit(boolean waitFlush,
boolean waitSearcher,
boolean softCommit)
Performs an explicit commit, causing pending documents to be committed for indexing
|
UpdateResponse |
commit(String collection)
Performs an explicit commit, causing pending documents to be committed for indexing
waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access
|
UpdateResponse |
commit(String collection,
boolean waitFlush,
boolean waitSearcher)
Performs an explicit commit, causing pending documents to be committed for indexing
|
UpdateResponse |
commit(String collection,
boolean waitFlush,
boolean waitSearcher,
boolean softCommit)
Performs an explicit commit, causing pending documents to be committed for indexing
|
UpdateResponse |
deleteById(List<String> ids)
Deletes a list of documents by unique ID
|
UpdateResponse |
deleteById(List<String> ids,
int commitWithinMs)
Deletes a list of documents by unique ID, specifying max time before commit
|
UpdateResponse |
deleteById(String id)
Deletes a single document by unique ID
|
UpdateResponse |
deleteById(String id,
int commitWithinMs)
Deletes a single document by unique ID, specifying max time before commit
|
UpdateResponse |
deleteById(String collection,
List<String> ids)
Deletes a list of documents by unique ID
|
UpdateResponse |
deleteById(String collection,
List<String> ids,
int commitWithinMs)
Deletes a list of documents by unique ID, specifying max time before commit
|
UpdateResponse |
deleteById(String collection,
String id)
Deletes a single document by unique ID
|
UpdateResponse |
deleteById(String collection,
String id,
int commitWithinMs)
Deletes a single document by unique ID, specifying max time before commit
|
UpdateResponse |
deleteByQuery(String query)
Deletes documents from the index based on a query
|
UpdateResponse |
deleteByQuery(String query,
int commitWithinMs)
Deletes documents from the index based on a query, specifying max time before commit
|
UpdateResponse |
deleteByQuery(String collection,
String query)
Deletes documents from the index based on a query
|
UpdateResponse |
deleteByQuery(String collection,
String query,
int commitWithinMs)
Deletes documents from the index based on a query, specifying max time before commit
|
DocumentObjectBinder |
getBinder()
Get the
DocumentObjectBinder for this client. |
SolrDocumentList |
getById(Collection<String> ids)
Retrieves the SolrDocuments associated with the given identifiers.
|
SolrDocumentList |
getById(Collection<String> ids,
SolrParams params)
Retrieves the SolrDocuments associated with the given identifiers and uses
the SolrParams to execute the request.
|
SolrDocument |
getById(String id)
Retrieves the SolrDocument associated with the given identifier.
|
SolrDocumentList |
getById(String collection,
Collection<String> ids)
Retrieves the SolrDocuments associated with the given identifiers.
|
SolrDocumentList |
getById(String collection,
Collection<String> ids,
SolrParams params)
Retrieves the SolrDocuments associated with the given identifiers and uses
the SolrParams to execute the request.
|
SolrDocument |
getById(String id,
SolrParams params)
Retrieves the SolrDocument associated with the given identifier and uses
the SolrParams to execute the request.
|
SolrDocument |
getById(String collection,
String id)
Retrieves the SolrDocument associated with the given identifier.
|
SolrDocument |
getById(String collection,
String id,
SolrParams params)
Retrieves the SolrDocument associated with the given identifier and uses
the SolrParams to execute the request.
|
UpdateResponse |
optimize()
Performs an explicit optimize, causing a merge of all segments to one.
|
UpdateResponse |
optimize(boolean waitFlush,
boolean waitSearcher)
Performs an explicit optimize, causing a merge of all segments to one.
|
UpdateResponse |
optimize(boolean waitFlush,
boolean waitSearcher,
int maxSegments)
Performs an explicit optimize, causing a merge of all segments to one.
|
UpdateResponse |
optimize(String collection)
Performs an explicit optimize, causing a merge of all segments to one.
|
UpdateResponse |
optimize(String collection,
boolean waitFlush,
boolean waitSearcher)
Performs an explicit optimize, causing a merge of all segments to one.
|
UpdateResponse |
optimize(String collection,
boolean waitFlush,
boolean waitSearcher,
int maxSegments)
Performs an explicit optimize, causing a merge of all segments to one.
|
SolrPingResponse |
ping()
Issues a ping request to check if the server is alive
|
QueryResponse |
query(SolrParams params)
Performs a query to the Solr server
|
QueryResponse |
query(SolrParams params,
SolrRequest.METHOD method)
Performs a query to the Solr server
|
QueryResponse |
query(String collection,
SolrParams params)
Performs a query to the Solr server
|
QueryResponse |
query(String collection,
SolrParams params,
SolrRequest.METHOD method)
Performs a query to the Solr server
|
QueryResponse |
queryAndStreamResponse(SolrParams params,
StreamingResponseCallback callback)
Query solr, and stream the results.
|
QueryResponse |
queryAndStreamResponse(String collection,
SolrParams params,
StreamingResponseCallback callback)
Query solr, and stream the results.
|
NamedList<Object> |
request(SolrRequest request)
Execute a request against a Solr server
|
abstract NamedList<Object> |
request(SolrRequest request,
String collection)
Execute a request against a Solr server for a given collection
|
UpdateResponse |
rollback()
Performs a rollback of all non-committed documents pending.
|
UpdateResponse |
rollback(String collection)
Performs a rollback of all non-committed documents pending.
|
public UpdateResponse add(String collection, Collection<SolrInputDocument> docs) throws SolrServerException, IOException
collection
- the Solr collection to add documents todocs
- the collection of documentsUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(Collection<SolrInputDocument> docs) throws SolrServerException, IOException
docs
- the collection of documentsUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(String collection, Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException
collection
- the Solr collection to add documents todocs
- the collection of documentscommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException
docs
- the collection of documentscommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(String collection, SolrInputDocument doc) throws SolrServerException, IOException
collection
- the Solr collection to add the document todoc
- the input documentUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(SolrInputDocument doc) throws SolrServerException, IOException
doc
- the input documentUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(String collection, SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException
collection
- the Solr collection to add the document todoc
- the input documentcommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException
doc
- the input documentcommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(String collection, Iterator<SolrInputDocument> docIterator) throws SolrServerException, IOException
collection
- the Solr collection to add the documents todocIterator
- the iterator which returns SolrInputDocument instancesUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse add(Iterator<SolrInputDocument> docIterator) throws SolrServerException, IOException
docIterator
- the iterator which returns SolrInputDocument instancesUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBean(String collection, Object obj) throws IOException, SolrServerException
SolrInputDocument
by the client's
DocumentObjectBinder
collection
- to Solr collection to add documents toobj
- the input beanUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBean(Object obj) throws IOException, SolrServerException
SolrInputDocument
by the client's
DocumentObjectBinder
obj
- the input beanUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBean(String collection, Object obj, int commitWithinMs) throws IOException, SolrServerException
SolrInputDocument
by the client's
DocumentObjectBinder
collection
- to Solr collection to add documents toobj
- the input beanUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, SolrServerException
SolrInputDocument
by the client's
DocumentObjectBinder
obj
- the input beanUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBeans(String collection, Collection<?> beans) throws SolrServerException, IOException
SolrInputDocument
s by the client's
DocumentObjectBinder
collection
- the Solr collection to add documents tobeans
- the collection of beansUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBeans(Collection<?> beans) throws SolrServerException, IOException
SolrInputDocument
s by the client's
DocumentObjectBinder
beans
- the collection of beansUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBeans(String collection, Collection<?> beans, int commitWithinMs) throws SolrServerException, IOException
SolrInputDocument
s by the client's
DocumentObjectBinder
collection
- the Solr collection to add documents tobeans
- the collection of beanscommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the servergetBinder()
public UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws SolrServerException, IOException
SolrInputDocument
s by the client's
DocumentObjectBinder
beans
- the collection of beanscommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the servergetBinder()
public UpdateResponse addBeans(String collection, Iterator<?> beanIterator) throws SolrServerException, IOException
collection
- the Solr collection to add the documents tobeanIterator
- the iterator which returns BeansUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse addBeans(Iterator<?> beanIterator) throws SolrServerException, IOException
beanIterator
- the iterator which returns BeansUpdateResponse
from the serverIOException
- if there is a communication error with the serverSolrServerException
- if there is an error on the serverpublic UpdateResponse commit(String collection) throws SolrServerException, IOException
collection
- the Solr collection to send the commit toUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse commit() throws SolrServerException, IOException
UpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse commit(String collection, boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException
collection
- the Solr collection to send the commit towaitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as the
main query searcher, making the changes visibleUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException
waitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as the
main query searcher, making the changes visibleUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse commit(String collection, boolean waitFlush, boolean waitSearcher, boolean softCommit) throws SolrServerException, IOException
collection
- the Solr collection to send the commit towaitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as the
main query searcher, making the changes visiblesoftCommit
- makes index changes visible while neither fsync-ing index files
nor writing a new index descriptorUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse commit(boolean waitFlush, boolean waitSearcher, boolean softCommit) throws SolrServerException, IOException
waitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as the
main query searcher, making the changes visiblesoftCommit
- makes index changes visible while neither fsync-ing index files
nor writing a new index descriptorUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize(String collection) throws SolrServerException, IOException
collection
- the Solr collection to send the optimize toUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize() throws SolrServerException, IOException
UpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize(String collection, boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException
Note: In most cases it is not required to do explicit optimize
collection
- the Solr collection to send the optimize towaitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as
the main query searcher, making the changes visibleUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize(boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException
Note: In most cases it is not required to do explicit optimize
waitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as
the main query searcher, making the changes visibleUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize(String collection, boolean waitFlush, boolean waitSearcher, int maxSegments) throws SolrServerException, IOException
collection
- the Solr collection to send the optimize towaitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as
the main query searcher, making the changes visiblemaxSegments
- optimizes down to at most this number of segmentsUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse optimize(boolean waitFlush, boolean waitSearcher, int maxSegments) throws SolrServerException, IOException
waitFlush
- block until index changes are flushed to diskwaitSearcher
- block until a new searcher is opened and registered as
the main query searcher, making the changes visiblemaxSegments
- optimizes down to at most this number of segmentsUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse rollback(String collection) throws SolrServerException, IOException
collection
- the Solr collection to send the rollback toUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse rollback() throws SolrServerException, IOException
UpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String collection, String id) throws SolrServerException, IOException
collection
- the Solr collection to delete the document fromid
- the ID of the document to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String id) throws SolrServerException, IOException
id
- the ID of the document to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String collection, String id, int commitWithinMs) throws SolrServerException, IOException
collection
- the Solr collection to delete the document fromid
- the ID of the document to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String id, int commitWithinMs) throws SolrServerException, IOException
id
- the ID of the document to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String collection, List<String> ids) throws SolrServerException, IOException
collection
- the Solr collection to delete the documents fromids
- the list of document IDs to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(List<String> ids) throws SolrServerException, IOException
ids
- the list of document IDs to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(String collection, List<String> ids, int commitWithinMs) throws SolrServerException, IOException
collection
- the Solr collection to delete the documents fromids
- the list of document IDs to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws SolrServerException, IOException
ids
- the list of document IDs to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteByQuery(String collection, String query) throws SolrServerException, IOException
collection
- the Solr collection to delete the documents fromquery
- the query expressing what documents to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteByQuery(String query) throws SolrServerException, IOException
query
- the query expressing what documents to deleteUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteByQuery(String collection, String query, int commitWithinMs) throws SolrServerException, IOException
collection
- the Solr collection to delete the documents fromquery
- the query expressing what documents to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic UpdateResponse deleteByQuery(String query, int commitWithinMs) throws SolrServerException, IOException
query
- the query expressing what documents to deletecommitWithinMs
- max time (in ms) before a commit will happenUpdateResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrPingResponse ping() throws SolrServerException, IOException
SolrPingResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse query(String collection, SolrParams params) throws SolrServerException, IOException
collection
- the Solr collection to queryparams
- an object holding all key/value parameters to send along the requestQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse query(SolrParams params) throws SolrServerException, IOException
params
- an object holding all key/value parameters to send along the requestQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse query(String collection, SolrParams params, SolrRequest.METHOD method) throws SolrServerException, IOException
collection
- the Solr collection to queryparams
- an object holding all key/value parameters to send along the requestmethod
- specifies the HTTP method to use for the request, such as GET or POSTQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse query(SolrParams params, SolrRequest.METHOD method) throws SolrServerException, IOException
params
- an object holding all key/value parameters to send along the requestmethod
- specifies the HTTP method to use for the request, such as GET or POSTQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse queryAndStreamResponse(String collection, SolrParams params, StreamingResponseCallback callback) throws SolrServerException, IOException
collection
- the Solr collection to queryparams
- an object holding all key/value parameters to send along the requestcallback
- the callback to stream results toQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic QueryResponse queryAndStreamResponse(SolrParams params, StreamingResponseCallback callback) throws SolrServerException, IOException
params
- an object holding all key/value parameters to send along the requestcallback
- the callback to stream results toQueryResponse
containing the response
from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocument getById(String collection, String id) throws SolrServerException, IOException
collection
- the Solr collection to queryid
- the idIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocument getById(String id) throws SolrServerException, IOException
id
- the idIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocument getById(String collection, String id, SolrParams params) throws SolrServerException, IOException
collection
- the Solr collection to queryid
- the idparams
- additional parameters to add to the queryIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocument getById(String id, SolrParams params) throws SolrServerException, IOException
id
- the idparams
- additional parameters to add to the queryIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocumentList getById(String collection, Collection<String> ids) throws SolrServerException, IOException
collection
- the Solr collection to queryids
- the idsIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocumentList getById(Collection<String> ids) throws SolrServerException, IOException
ids
- the idsIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocumentList getById(String collection, Collection<String> ids, SolrParams params) throws SolrServerException, IOException
collection
- the Solr collection to queryids
- the idsparams
- additional parameters to add to the queryIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic SolrDocumentList getById(Collection<String> ids, SolrParams params) throws SolrServerException, IOException
ids
- the idsparams
- additional parameters to add to the queryIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic abstract NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
request
- the request to executecollection
- the collection to execute the request againstNamedList
containing the response from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic final NamedList<Object> request(SolrRequest request) throws SolrServerException, IOException
request
- the request to executeNamedList
containing the response from the serverIOException
- If there is a low-level I/O error.SolrServerException
- if there is an error on the serverpublic DocumentObjectBinder getBinder()
DocumentObjectBinder
for this client.addBean(java.lang.String, java.lang.Object)
,
addBeans(java.lang.String, java.util.Collection<?>)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.