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 |
---|---|
static Set<String> |
computeInPlaceUpdatableFields(AddUpdateCommand cmd)
Given an add update command, compute a list of fields that can be updated in-place.
|
protected void |
doAdd(SolrInputDocument toDoc,
SolrInputField sif,
Object fieldVal) |
protected void |
doAddDistinct(SolrInputDocument toDoc,
SolrInputField sif,
Object fieldVal) |
protected void |
doInc(SolrInputDocument toDoc,
SolrInputField sif,
Object fieldVal) |
boolean |
doInPlaceUpdateMerge(AddUpdateCommand cmd,
Set<String> updatedFields)
Given an AddUpdateCommand containing update operations (e.g.
|
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 commandspublic static Set<String> computeInPlaceUpdatableFields(AddUpdateCommand cmd) throws IOException
IOException
public boolean doInPlaceUpdateMerge(AddUpdateCommand cmd, Set<String> updatedFields) throws IOException
IOException
protected void doSet(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)
protected void doAdd(SolrInputDocument toDoc, SolrInputField sif, Object fieldVal)
protected void doAddDistinct(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-2019 Apache Software Foundation. All Rights Reserved.