@@ -32,6 +32,30 @@ final class SolrInputDocument
3232 /** @var int Sorts the fields by boost value. */
3333 public const SORT_FIELD_BOOST_VALUE = 4 ;
3434
35+ /** @var int Adds a new value to a multivalued field. */
36+ public const UPDATE_MODIFIER_ADD = 1 ;
37+
38+ /** @var int Sets a field value. */
39+ public const UPDATE_MODIFIER_SET = 2 ;
40+
41+ /** @var int Increments a field value. */
42+ public const UPDATE_MODIFIER_INC = 3 ;
43+
44+ /** @var int Removes a value from a multivalued field. */
45+ public const UPDATE_MODIFIER_REMOVE = 4 ;
46+
47+ /** @var int Removes values matching a java regular expression. */
48+ public const UPDATE_MODIFIER_REMOVEREGEX = 5 ;
49+
50+ /** @var int Concurrency default. */
51+ public const VERSION_ASSERT_NONE = 0 ;
52+
53+ /** @var int Assert that a document does not exist, will fail if the document exists. */
54+ public const VERSION_ASSERT_NOT_EXISTS = -1 ;
55+
56+ /** @var int Assert that the document already exists if the document does not exist, the updates will be rejected. */
57+ public const VERSION_ASSERT_EXISTS = 1 ;
58+
3559 /**
3660 * (PECL solr >= 2.3.0)<br/>
3761 * Adds a child document for block indexing
@@ -78,6 +102,21 @@ public function addChildDocuments(array &$docs) {}
78102 */
79103 public function addField ($ fieldName , $ fieldValue , $ fieldBoostValue = 0.0 ) {}
80104
105+ /**
106+ * (PECL solr >= 2.5.0)<br/>
107+ * Updates a field in the document
108+ * @param string $fieldName <p>
109+ * The name of the field.
110+ * </p>
111+ * @param int $modifier <p>
112+ * The modifier to use for this update.
113+ * </p>
114+ * @param string $value <p>
115+ * The value for the field.
116+ * </p>
117+ */
118+ public function updateField ($ fieldName , $ modifier , $ value ) {}
119+
81120 /**
82121 * (PECL solr >= 0.9.2)<br/>
83122 * Resets the input document
@@ -271,6 +310,25 @@ public function setBoost($documentBoostValue) {}
271310 */
272311 public function setFieldBoost ($ fieldName , $ fieldBoostValue ) {}
273312
313+ /**
314+ * (PECL solr >= 2.5.0)<br/>
315+ * Set document version to enable optimistic concurrency mode using self::VERSION_* constants
316+ * or asserting version match
317+ * @param int $version <p>
318+ * The document version.
319+ * </p>
320+ */
321+ public function setVersion ($ version ) {}
322+
323+ /**
324+ * (PECL solr >= 2.5.0)<br/>
325+ * Get the document version
326+ * @return int <p>
327+ * The document version.
328+ * </p>
329+ */
330+ public function getVersion () {}
331+
274332 /**
275333 * (PECL solr >= 0.9.2)<br/>
276334 * Sorts the fields within the document
0 commit comments