Class PartialUpdate
java.lang.Object
org.springframework.data.solr.core.query.PartialUpdate
- All Implemented Interfaces:
Update
Implementation of
Update can directly be saved via
Update to be used when performing atomic updates against solr. Update can directly be saved via
SolrOperations.saveBean(String, Object)-
Constructor Summary
ConstructorsConstructorDescriptionPartialUpdate(String idFieldName, Object idFieldValue) PartialUpdate(Field idField, Object idFieldValue) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd field with given name and value to the fields to be updated.voidadd(UpdateField field) AddUpdateFieldto the list of fields to be updatedvoidaddValueToField(String fieldName, Object value) Add field with given name and value usingUpdateAction.ADDto the fields to be updated.get id field of document to updateList of fields and values to updateDocument Version_version_voidincreaseValueOfField(String fieldName, Object value) Add field with given name and value usingUpdateAction.INCto the fields to be updated.voidsetValueOfField(String fieldName, Object value) Add field with given name and value usingUpdateAction.SETto the fields to be updated.voidsetVersion(Object documentVersion) set_version_of document to apply update to.
-
Constructor Details
-
PartialUpdate
-
PartialUpdate
-
-
Method Details
-
getIdField
Description copied from interface:Updateget id field of document to update- Specified by:
getIdFieldin interfaceUpdate- Returns:
-
add
Add field with given name and value to the fields to be updated. DefaultUpdateActionwill beEnum.EnumDesc.- Parameters:
fieldName-value-
-
add
AddUpdateFieldto the list of fields to be updated- Parameters:
field-
-
addValueToField
Add field with given name and value usingUpdateAction.ADDto the fields to be updated.- Parameters:
fieldName-value-
-
setValueOfField
Add field with given name and value usingUpdateAction.SETto the fields to be updated.- Parameters:
fieldName-value-
-
increaseValueOfField
Add field with given name and value usingUpdateAction.INCto the fields to be updated.- Parameters:
fieldName-value-
-
getUpdates
Description copied from interface:UpdateList of fields and values to update- Specified by:
getUpdatesin interfaceUpdate- Returns:
-
getVersion
Description copied from interface:UpdateDocument Version_version_- Specified by:
getVersionin interfaceUpdate- Returns:
-
setVersion
set_version_of document to apply update to. Use null to skip version check in solr.- Parameters:
documentVersion-
-