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

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

All Implemented Interfaces:
  Serializable

    public class UpdateRequest

extends AbstractUpdateRequest

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

Nested Class Summary
`static class` `UpdateRequest.ACTION` Deprecated. Use `AbstractUpdateRequest.ACTION` instead

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

Field Summary

Fields inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest
`commitWithin, params`

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

Method Summary
`UpdateRequest` `add(Collection<SolrInputDocument> docs)`
`UpdateRequest` `add(SolrInputDocument doc)`
`void` `clear()` clear the pending documents and delete commands
`UpdateRequest` `deleteById(List<String> ids)`
`UpdateRequest` `deleteById(String id)`
`UpdateRequest` `deleteByQuery(String q)`
`Collection<ContentStream>` `getContentStreams()`
`List<String>` `getDeleteById()`
`List<String>` `getDeleteQuery()`
`Iterator<SolrInputDocument>` `getDocIterator()`
`List<SolrInputDocument>` `getDocuments()`
`String` `getXML()`
`UpdateRequest` `setAction(UpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher)` Deprecated. Use `AbstractUpdateRequest.ACTION` instead
`UpdateRequest` `setAction(UpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments)` Deprecated. Use `AbstractUpdateRequest.ACTION` instead
`UpdateRequest` `setAction(UpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean expungeDeletes)` Deprecated. Use `AbstractUpdateRequest.ACTION` instead
`void` `setDocIterator(Iterator<SolrInputDocument> docIterator)`
`void` `writeXML(Writer writer)`

Methods inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest
`getAction, getCommitWithin, getParams, isWaitFlush, isWaitSearcher, process, rollback, setAction, setAction, setAction, setCommitWithin, setParam, setParams, setWaitFlush, setWaitSearcher`

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(SolrInputDocument doc)

### add

    public UpdateRequest add(Collection<SolrInputDocument> docs)

### deleteById

    public UpdateRequest deleteById(String id)

### deleteById

    public UpdateRequest deleteById(List<String> ids)

### deleteByQuery

    public UpdateRequest deleteByQuery(String q)

### setAction

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

  Deprecated. Use `AbstractUpdateRequest.ACTION` instead

  Sets appropriate parameters for the given ACTION

### setAction

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

  Deprecated. Use `AbstractUpdateRequest.ACTION` instead

### setAction

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

  Deprecated. Use `AbstractUpdateRequest.ACTION` instead

### setDocIterator

    public void setDocIterator(Iterator<SolrInputDocument> docIterator)

### getContentStreams

    public Collection<ContentStream> getContentStreams()
                                                throws IOException

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

### getXML

    public String getXML()
                  throws IOException

  Throws:
    `IOException`

### writeXML

    public void writeXML(Writer writer)
                  throws IOException

  Throws:
    `IOException`
  Since:
    solr 1.4

### getDocuments

    public List<SolrInputDocument> getDocuments()

### getDocIterator

    public Iterator<SolrInputDocument> getDocIterator()

### getDeleteById

    public List<String> getDeleteById()

### getDeleteQuery

    public List<String> getDeleteQuery()

Copyright © 2011 Apache Software Foundation. All Rights Reserved.