org.apache.solr.client.solrj.embedded
Class EmbeddedSolrServer
java.lang.Object
org.apache.solr.client.solrj.SolrServer
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer
- All Implemented Interfaces:
- Serializable
public class EmbeddedSolrServer
- extends org.apache.solr.client.solrj.SolrServer
SolrServer that connects directly to SolrCore
TODO -- this implementation sends the response to XML and then parses it.
It *should* be able to convert the response directly into a named list.
- Since:
- solr 1.3
- Version:
- $Id: EmbeddedSolrServer.java 718395 2008-11-17 21:44:01Z ryan $
- See Also:
- Serialized Form
Methods inherited from class org.apache.solr.client.solrj.SolrServer |
add, add, addBean, addBeans, commit, commit, deleteById, deleteById, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query, rollback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
coreContainer
protected final CoreContainer coreContainer
coreName
protected final String coreName
EmbeddedSolrServer
@Deprecated
public EmbeddedSolrServer(SolrCore core)
- Deprecated.
- Use the other constructor using a CoreContainer and a name.
- Parameters:
core
-
EmbeddedSolrServer
public EmbeddedSolrServer(CoreContainer coreContainer,
String coreName)
- Creates a SolrServer.
- Parameters:
coreContainer
- the core containercoreName
- the core name
request
public org.apache.solr.common.util.NamedList<Object> request(org.apache.solr.client.solrj.SolrRequest request)
throws org.apache.solr.client.solrj.SolrServerException,
IOException
- Specified by:
request
in class org.apache.solr.client.solrj.SolrServer
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
getParsedResponse
public org.apache.solr.common.util.NamedList<Object> getParsedResponse(SolrQueryRequest req,
SolrQueryResponse rsp)
- Deprecated. use
BinaryResponseWriter.getParsedResponse(SolrQueryRequest, SolrQueryResponse)
- Parameters:
req
- rsp
-
- Returns:
- a response object equivalent to what you get from the XML/JSON/javabin parser. Documents
become SolrDocuments, DocList becomes SolrDocumentList etc.
Copyright © 2011 Apache Software Foundation. All Rights Reserved.