org.apache.solr.update

## Class AddUpdateCommand

- java.lang.Object
- - org.apache.solr.update.UpdateCommand
  - - org.apache.solr.update.AddUpdateCommand

- All Implemented Interfaces:
    Cloneable, Iterable<Document>

      public class AddUpdateCommand
      extends UpdateCommand
      implements Iterable<Document>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `commitWithin`
    `boolean` | `isLastDocInBatch`
    `boolean` | `overwrite`
    `int` | `pollQueueTime`
    `SolrInputDocument` | `solrDoc`
    `Term` | `updateTerm`

    - ### Fields inherited from class org.apache.solr.update.UpdateCommand

      `BUFFERING, CLEAR_CACHES, flags, IGNORE_AUTOCOMMIT, PEER_SYNC, REPLAY, req, route, version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AddUpdateCommand(SolrQueryRequest req)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Reset state to reuse this object with a different document in the same request
    `String` | `getHashableId()`
    `BytesRef` | `getIndexedId()` Returns the indexed ID for this document.
    `Document` | `getLuceneDocument()` Creates and returns a lucene Document to index.
    `String` | `getPrintableId()`
    `SolrInputDocument` | `getSolrInputDocument()`
    `boolean` | `isBlock()`
    `Iterator<Document>` | `iterator()`
    `String` | `name()`
    `void` | `setIndexedId(BytesRef indexedId)`
    `String` | `toString()`

    - ### Methods inherited from class org.apache.solr.update.UpdateCommand

      `clone, getFlags, getReq, getRoute, getVersion, setFlags, setReq, setRoute, setVersion`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### solrDoc

          public SolrInputDocument solrDoc

    - #### overwrite

          public boolean overwrite

    - #### updateTerm

          public Term updateTerm

    - #### commitWithin

          public int commitWithin

    - #### isLastDocInBatch

          public boolean isLastDocInBatch

    - #### pollQueueTime

          public int pollQueueTime

  - ### Constructor Detail

    - #### AddUpdateCommand

          public AddUpdateCommand(SolrQueryRequest req)

  - ### Method Detail

    - #### name

          public String name()

      Specified by:
        `name` in class `UpdateCommand`

    - #### clear

          public void clear()

      Reset state to reuse this object with a different document in the same request

    - #### getSolrInputDocument

          public SolrInputDocument getSolrInputDocument()

    - #### getLuceneDocument

          public Document getLuceneDocument()

      Creates and returns a lucene Document to index. Any changes made to the returned Document will not be reflected in the SolrInputDocument, or future calls to this method.

    - #### getIndexedId

          public BytesRef getIndexedId()

      Returns the indexed ID for this document. The returned BytesRef is retained across multiple calls, and should not be modified.

    - #### setIndexedId

          public void setIndexedId(BytesRef indexedId)

    - #### getPrintableId

          public String getPrintableId()

    - #### getHashableId

          public String getHashableId()

      Returns:
        String id to hash

    - #### isBlock

          public boolean isBlock()

    - #### iterator

          public Iterator<Document> iterator()

      Specified by:
        `iterator` in interface `Iterable<Document>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `UpdateCommand`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.