public class AtomicUpdateDocumentMerger extends Object
Modifier and Type | Field and Description |
---|---|
protected SchemaField |
idField |
protected IndexSchema |
schema |
Constructor and Description |
---|
AtomicUpdateDocumentMerger(SolrQueryRequest queryReq) |
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.
|
protected final IndexSchema schema
protected final SchemaField idField
public AtomicUpdateDocumentMerger(SolrQueryRequest queryReq)
public static boolean isAtomicUpdate(AddUpdateCommand cmd)
public SolrInputDocument merge(SolrInputDocument fromDoc, SolrInputDocument toDoc)
fromDoc
- SolrInputDocument which will merged into the toDoctoDoc
- the final SolrInputDocument that will be mutated with the values from the fromDoc atomic commandsprotected void doSet(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)
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)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.