Package org.apache.solr.client.solrj.request

# Class AbstractUpdateRequest

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<UpdateResponse>
org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest<UpdateResponse>
org.apache.solr.client.solrj.request.AbstractUpdateRequest

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ContentStreamUpdateRequest`, `MultiContentWriterRequest`, `StreamingUpdateRequest`, `UpdateRequest`

public abstract class AbstractUpdateRequest extends CollectionRequiringSolrRequest<UpdateResponse>

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`AbstractUpdateRequest.ACTION`

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

`SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`commitWithin`
`protected ModifiableSolrParams`
`params`

### Fields inherited from class org.apache.solr.client.solrj.SolrRequest

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`AbstractUpdateRequest(SolrRequest.METHOD m, String path)`

## Method Summary

Modifier and Type
Method
Description
`protected UpdateResponse`
`createResponse(NamedList<Object> namedList)`
Create a new SolrResponse to hold the response from the server.
`AbstractUpdateRequest.ACTION`
`getAction()`
`int`
`getCommitWithin()`
`ModifiableSolrParams`
`getParams()`
The parameters for this request; never null.
`boolean`
`isWaitSearcher()`
`AbstractUpdateRequest`
`rollback()`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher)`
Sets appropriate parameters for the given ACTION
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, boolean softCommit)`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, boolean softCommit, int maxSegments)`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments)`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean expungeDeletes)`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean softCommit, boolean expungeDeletes)`
`AbstractUpdateRequest`
`setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean softCommit, boolean expungeDeletes, boolean openSearcher)`
`AbstractUpdateRequest`
`setCommitWithin(int commitWithin)`
`void`
`setParam(String param, String value)`
`void`
`setParams(ModifiableSolrParams params)`
Sets the parameters for this update request, overwriting any previous
`void`
`setWaitSearcher(boolean waitSearcher)`

### Methods inherited from class org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest

`requiresCollection`

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### params

protected ModifiableSolrParams params

### commitWithin

protected int commitWithin

## Constructor Details

### AbstractUpdateRequest

public AbstractUpdateRequest(SolrRequest.METHOD m, String path)

## Method Details

### setAction

public AbstractUpdateRequest setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher)
Sets appropriate parameters for the given ACTION

### setAction

public AbstractUpdateRequest setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, boolean softCommit)

### setAction

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

### setAction

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

### setAction

public AbstractUpdateRequest setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean softCommit, boolean expungeDeletes)

### setAction

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

### setAction

public AbstractUpdateRequest setAction(AbstractUpdateRequest.ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments, boolean softCommit, boolean expungeDeletes, boolean openSearcher)

### rollback

public AbstractUpdateRequest rollback()

Since:
  Solr 1.4

### setParam

public void setParam(String param, String value)

### setParams

public void setParams(ModifiableSolrParams params)
Sets the parameters for this update request, overwriting any previous

### getParams

public ModifiableSolrParams getParams()
Description copied from class: `SolrRequest`
The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this `SolrRequest` instance, as it may return a new instance here every time. If the subclass specifies the response type as `ModifiableSolrParams`, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.

Specified by:
  `getParams` in class `SolrRequest<UpdateResponse>`

### createResponse

protected UpdateResponse createResponse(NamedList<Object> namedList)
Description copied from class: `SolrRequest`
Create a new SolrResponse to hold the response from the server. If the response extends `SolrResponse`, then there's no need to use the arguments, as `SolrResponse.setResponse(NamedList)` will be called right after this method.

Specified by:
  `createResponse` in class `SolrRequest<UpdateResponse>`
Parameters:
  `namedList` - from `SolrClient.request(SolrRequest, String)`.

### isWaitSearcher

public boolean isWaitSearcher()

### getAction

public AbstractUpdateRequest.ACTION getAction()

### setWaitSearcher

public void setWaitSearcher(boolean waitSearcher)

### getCommitWithin

public int getCommitWithin()

### setCommitWithin

public AbstractUpdateRequest setCommitWithin(int commitWithin)