Package org.apache.solr.util
Class MockSearchableSolrClient
- java.lang.Object
- 
- org.apache.solr.client.solrj.SolrClient
- 
- org.apache.solr.util.MockSearchableSolrClient
 
 
- 
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable
 
 public class MockSearchableSolrClient extends SolrClient Simple mock client that collects added documents and supports simple search by id (both{!term f=id}andid:syntax is supported) or *:*.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description MockSearchableSolrClient()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()longgetNumQueries()longgetNumUpdates()NamedList<Object>request(SolrRequest<?> request, String coll)- 
Methods inherited from class org.apache.solr.client.solrj.SolrClientadd, 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, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
 
- 
 
- 
- 
- 
Field Detail- 
docspublic Map<String,Map<String,SolrInputDocument>> docs 
 
- 
 - 
Method Detail- 
clearpublic void clear() 
 - 
requestpublic NamedList<Object> request(SolrRequest<?> request, String coll) throws SolrServerException, IOException - Specified by:
- requestin class- SolrClient
- Throws:
- SolrServerException
- IOException
 
 - 
getNumUpdatespublic long getNumUpdates() 
 - 
getNumQueriespublic long getNumQueries() 
 - 
closepublic void close() throws IOException- Throws:
- IOException
 
 
- 
 
-