## org.apache.solr.client.solrj
Class SolrServer

    java.lang.Object
      org.apache.solr.client.solrj.SolrServer

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CommonsHttpSolrServer, EmbeddedSolrServer

    public abstract class SolrServer

extends Object
implements Serializable

Since:
  solr 1.3
Version:
  $Id: SolrServer.java 679548 2008-07-24 21:17:43Z ryan $
See Also:
  Serialized Form

Constructor Summary
`SolrServer()`

Method Summary
`UpdateResponse` `add(Collection<org.apache.solr.common.SolrInputDocument> docs)`
`UpdateResponse` `add(org.apache.solr.common.SolrInputDocument doc)`
`UpdateResponse` `addBean(Object obj)`
`UpdateResponse` `addBeans(Collection<?> beans)`
`UpdateResponse` `commit()` waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access
`UpdateResponse` `commit(boolean waitFlush, boolean waitSearcher)`
`UpdateResponse` `deleteById(String id)`
`UpdateResponse` `deleteByQuery(String query)`
`DocumentObjectBinder` `getBinder()`
`UpdateResponse` `optimize()` waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access
`UpdateResponse` `optimize(boolean waitFlush, boolean waitSearcher)`
`UpdateResponse` `optimize(boolean waitFlush, boolean waitSearcher, int maxSegments)`
`SolrPingResponse` `ping()`
`QueryResponse` `query(org.apache.solr.common.params.SolrParams params)`
`QueryResponse` `query(org.apache.solr.common.params.SolrParams params, SolrRequest.METHOD method)`
`abstract 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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SolrServer

    public SolrServer()

Method Detail

### add

    public UpdateResponse add(Collection<org.apache.solr.common.SolrInputDocument> docs)
                       throws SolrServerException,
                              IOException

  Throws:
    `SolrServerException`
    `IOException`

### addBeans

    public UpdateResponse addBeans(Collection<?> beans)
                            throws SolrServerException,
                                   IOException

  Throws:
    `SolrServerException`
    `IOException`

### add

    public UpdateResponse add(org.apache.solr.common.SolrInputDocument doc)
                       throws SolrServerException,
                              IOException

  Throws:
    `SolrServerException`
    `IOException`

### addBean

    public UpdateResponse addBean(Object obj)
                           throws IOException,
                                  SolrServerException

  Throws:
    `IOException`
    `SolrServerException`

### commit

    public UpdateResponse commit()
                          throws SolrServerException,
                                 IOException

  waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access

  Throws:
    `IOException`
    `SolrServerException`

### optimize

    public UpdateResponse optimize()
                            throws SolrServerException,
                                   IOException

  waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access

  Throws:
    `IOException`
    `SolrServerException`

### commit

    public UpdateResponse commit(boolean waitFlush,
                                 boolean waitSearcher)
                          throws SolrServerException,
                                 IOException

  Throws:
    `SolrServerException`
    `IOException`

### optimize

    public UpdateResponse optimize(boolean waitFlush,
                                   boolean waitSearcher)
                            throws SolrServerException,
                                   IOException

  Throws:
    `SolrServerException`
    `IOException`

### optimize

    public UpdateResponse optimize(boolean waitFlush,
                                   boolean waitSearcher,
                                   int maxSegments)
                            throws SolrServerException,
                                   IOException

  Throws:
    `SolrServerException`
    `IOException`

### deleteById

    public UpdateResponse deleteById(String id)
                              throws SolrServerException,
                                     IOException

  Throws:
    `SolrServerException`
    `IOException`

### deleteByQuery

    public UpdateResponse deleteByQuery(String query)
                                 throws SolrServerException,
                                        IOException

  Throws:
    `SolrServerException`
    `IOException`

### ping

    public SolrPingResponse ping()
                          throws SolrServerException,
                                 IOException

  Throws:
    `SolrServerException`
    `IOException`

### query

    public QueryResponse query(org.apache.solr.common.params.SolrParams params)
                        throws SolrServerException

  Throws:
    `SolrServerException`

### query

    public QueryResponse query(org.apache.solr.common.params.SolrParams params,
                               SolrRequest.METHOD method)
                        throws SolrServerException

  Throws:
    `SolrServerException`

### request

    public abstract org.apache.solr.common.util.NamedList<Object> request(SolrRequest request)
                                                                   throws SolrServerException,
                                                                          IOException

  SolrServer implementations need to implement a how a request is actually processed

  Throws:
    `SolrServerException`
    `IOException`

### getBinder

    public DocumentObjectBinder getBinder()

Copyright © 2008 Apache Software Foundation. All Rights Reserved.