org.apache.solr.update.processor

## Class AtomicUpdateDocumentMerger

- java.lang.Object
- - org.apache.solr.update.processor.AtomicUpdateDocumentMerger

-     public class AtomicUpdateDocumentMerger
      extends Object

  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SchemaField` | `idField`
    `protected IndexSchema` | `schema`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AtomicUpdateDocumentMerger(SolrQueryRequest queryReq)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doAdd(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)`
    `protected void` | `doInc(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)`
    `protected void` | `doRemove(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)`
    `protected void` | `doRemoveRegex(SolrInputDocument toDoc, SolrInputField sif, Object valuePatterns)`
    `protected void` | `doSet(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)`
    `static boolean` | `isAtomicUpdate(AddUpdateCommand cmd)` Utility method that examines the SolrInputDocument in an AddUpdateCommand and returns true if the documents contains atomic update instructions.
    `SolrInputDocument` | `merge(SolrInputDocument fromDoc, SolrInputDocument toDoc)` Merges the fromDoc into the toDoc using the atomic update syntax.

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

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

- - ### Field Detail

    - #### schema

          protected final IndexSchema schema

    - #### idField

          protected final SchemaField idField

  - ### Constructor Detail

    - #### AtomicUpdateDocumentMerger

          public AtomicUpdateDocumentMerger(SolrQueryRequest queryReq)

  - ### Method Detail

    - #### isAtomicUpdate

          public static boolean isAtomicUpdate(AddUpdateCommand cmd)

      Utility method that examines the SolrInputDocument in an AddUpdateCommand and returns true if the documents contains atomic update instructions.

    - #### merge

          public SolrInputDocument merge(SolrInputDocument fromDoc,
                                         SolrInputDocument toDoc)

      Merges the fromDoc into the toDoc using the atomic update syntax.
      Parameters:
        `fromDoc` - SolrInputDocument which will merged into the toDoc
        `toDoc` - the final SolrInputDocument that will be mutated with the values from the fromDoc atomic commands
      Returns:
        toDoc with mutated values

    - #### doSet

          protected void doSet(SolrInputDocument toDoc,
                               SolrInputField sif,
                               Object fieldVal)

    - #### doAdd

          protected void doAdd(SolrInputDocument toDoc,
                               SolrInputField sif,
                               Object fieldVal)

    - #### doInc

          protected void doInc(SolrInputDocument toDoc,
                               SolrInputField sif,
                               Object fieldVal)

    - #### doRemove

          protected void doRemove(SolrInputDocument toDoc,
                                  SolrInputField sif,
                                  Object fieldVal)

    - #### doRemoveRegex

          protected void doRemoveRegex(SolrInputDocument toDoc,
                                       SolrInputField sif,
                                       Object valuePatterns)

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