Class CollectionScopedSolrClient
java.lang.Object
org.apache.solr.client.solrj.SolrClient
org.apache.solr.client.solrj.impl.CollectionScopedSolrClient
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
This SolrClient delegates to a backing client with a specified collection. Simple attempts to
refer to another collection will fail. DISCLAIMER: this isn't a security mechanism.
- See Also:
-
Field Summary
Fields inherited from class org.apache.solr.client.solrj.SolrClient
defaultCollection -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.solr.client.solrj.SolrClient
add, add, add, add, add, add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, getContext, getDefaultCollection, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
-
Constructor Details
-
CollectionScopedSolrClient
-
-
Method Details
-
request
public NamedList<Object> request(SolrRequest<?> request, String collection) throws SolrServerException, IOException Description copied from class:SolrClientExecute a request against a Solr server for a given collection- Specified by:
requestin classSolrClient- Parameters:
request- the request to executecollection- the collection to execute the request against- Returns:
- a
NamedListcontaining the response from the server - Throws:
SolrServerException- if there is an error on the serverIOException- If there is a low-level I/O error.
-
toString
-
close
- Throws:
IOException
-