org.apache.solr.client.solrj.embedded
Class EmbeddedSolrServer

java.lang.Object
  extended by org.apache.solr.client.solrj.SolrServer
      extended by org.apache.solr.client.solrj.embedded.EmbeddedSolrServer
All Implemented Interfaces:
Serializable

public class EmbeddedSolrServer
extends 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 686780 2008-08-18 15:08:28Z yonik $
See Also:
Serialized Form

Field Summary
protected  org.apache.solr.core.CoreContainer coreContainer
           
protected  String coreName
           
 
Constructor Summary
EmbeddedSolrServer(org.apache.solr.core.CoreContainer coreContainer, String coreName)
          Creates a SolrServer.
EmbeddedSolrServer(org.apache.solr.core.SolrCore core)
          Deprecated.  
 
Method Summary
 org.apache.solr.common.util.NamedList<Object> getParsedResponse(org.apache.solr.request.SolrQueryRequest req, org.apache.solr.request.SolrQueryResponse rsp)
          TODO -- in the future, this could perhaps transform the NamedList without serializing it then parsing it from the serialized form.
 org.apache.solr.common.util.NamedList<Object> request(SolrRequest request)
          SolrServer implementations need to implement a how a request is actually processed
 
Methods inherited from class org.apache.solr.client.solrj.SolrServer
add, add, addBean, addBeans, commit, commit, deleteById, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coreContainer

protected final org.apache.solr.core.CoreContainer coreContainer

coreName

protected final String coreName
Constructor Detail

EmbeddedSolrServer

@Deprecated
public EmbeddedSolrServer(org.apache.solr.core.SolrCore core)
Deprecated. 

Use the other constructor using a CoreContainer and a name.

Parameters:
core -

EmbeddedSolrServer

public EmbeddedSolrServer(org.apache.solr.core.CoreContainer coreContainer,
                          String coreName)
Creates a SolrServer.

Parameters:
coreContainer - the core container
coreName - the core name
Method Detail

request

public org.apache.solr.common.util.NamedList<Object> request(SolrRequest request)
                                                      throws SolrServerException,
                                                             IOException
Description copied from class: SolrServer
SolrServer implementations need to implement a how a request is actually processed

Specified by:
request in class SolrServer
Throws:
SolrServerException
IOException

getParsedResponse

public org.apache.solr.common.util.NamedList<Object> getParsedResponse(org.apache.solr.request.SolrQueryRequest req,
                                                                       org.apache.solr.request.SolrQueryResponse rsp)
TODO -- in the future, this could perhaps transform the NamedList without serializing it then parsing it from the serialized form.

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 © 2008 Apache Software Foundation. All Rights Reserved.