## org.apache.solr.client.solrj.request
Class UpdateRequest

    java.lang.Object
      org.apache.solr.client.solrj.SolrRequest
          org.apache.solr.client.solrj.request.UpdateRequest

All Implemented Interfaces:
  Serializable

    public class UpdateRequest

extends SolrRequest

Since:
  solr 1.3
Version:
  $Id$
See Also:
  Serialized Form

Nested Class Summary
`static class` `UpdateRequest.ACTION`

Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
`SolrRequest.METHOD`

Constructor Summary
`UpdateRequest()`
`UpdateRequest(String url)`

Method Summary
`UpdateRequest` `add(Collection<org.apache.solr.common.SolrInputDocument> docs)`
`UpdateRequest` `add(org.apache.solr.common.SolrInputDocument doc)`
`void` `clear()` clear the pending documents and delete commands
`UpdateRequest` `deleteById(String id)`
`UpdateRequest` `deleteByQuery(String q)`
`UpdateRequest.ACTION` `getAction()`
`Collection<org.apache.solr.common.util.ContentStream>` `getContentStreams()`
`org.apache.solr.common.params.ModifiableSolrParams` `getParams()`
`String` `getXML()`
`boolean` `isWaitFlush()`
`boolean` `isWaitSearcher()`
`UpdateResponse` `process(SolrServer server)`
`UpdateRequest` `setAction(UpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher)` Sets appropriate parameters for the given ACTION
`UpdateRequest` `setAction(UpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments)`
`void` `setParam(String param, String value)`
`void` `setParams(org.apache.solr.common.params.ModifiableSolrParams params)` Sets the parameters for this update request, overwriting any previous
`void` `setWaitFlush(boolean waitFlush)`
`void` `setWaitSearcher(boolean waitSearcher)`

Methods inherited from class org.apache.solr.client.solrj.SolrRequest
`getMethod, getPath, getResponseParser, setMethod, setPath, setResponseParser`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UpdateRequest

    public UpdateRequest()

### UpdateRequest

    public UpdateRequest(String url)

Method Detail

### clear

    public void clear()

  clear the pending documents and delete commands

### add

    public UpdateRequest add(org.apache.solr.common.SolrInputDocument doc)

### add

    public UpdateRequest add(Collection<org.apache.solr.common.SolrInputDocument> docs)

### deleteById

    public UpdateRequest deleteById(String id)

### deleteByQuery

    public UpdateRequest deleteByQuery(String q)

### setAction

    public UpdateRequest setAction(UpdateRequest.ACTION action,
                                   boolean waitFlush,
                                   boolean waitSearcher)

  Sets appropriate parameters for the given ACTION

### setAction

    public UpdateRequest setAction(UpdateRequest.ACTION action,
                                   boolean waitFlush,
                                   boolean waitSearcher,
                                   int maxSegments)

### setParam

    public void setParam(String param,
                         String value)

### setParams

    public void setParams(org.apache.solr.common.params.ModifiableSolrParams params)

  Sets the parameters for this update request, overwriting any previous

### getContentStreams

    public Collection<org.apache.solr.common.util.ContentStream> getContentStreams()
                                                                            throws IOException

  Specified by:
    `getContentStreams` in class `SolrRequest`
  Throws:
    `IOException`

### getXML

    public String getXML()
                  throws IOException

  Throws:
    `IOException`

### getParams

    public org.apache.solr.common.params.ModifiableSolrParams getParams()

  Specified by:
    `getParams` in class `SolrRequest`

### process

    public UpdateResponse process(SolrServer server)
                           throws SolrServerException,
                                  IOException

  Specified by:
    `process` in class `SolrRequest`
  Throws:
    `SolrServerException`
    `IOException`

### isWaitFlush

    public boolean isWaitFlush()

### isWaitSearcher

    public boolean isWaitSearcher()

### getAction

    public UpdateRequest.ACTION getAction()

### setWaitFlush

    public void setWaitFlush(boolean waitFlush)

### setWaitSearcher

    public void setWaitSearcher(boolean waitSearcher)

Copyright © 2008 Apache Software Foundation. All Rights Reserved.