Commit Graph

12 Commits

Author SHA1 Message Date
markharwood e6b459cb9f Update API enhancement - add support for scripted upserts.
In the case of inserts the UpdateHelper class will now allow the script used to apply updates to run on the upsert doc provided by clients. This allows the logic for managing the internal state of the data item to be managed by the script and is not reliant on clients performing the initialisation of data structures managed by the script.

Closes #7143
2014-08-05 16:52:44 +01:00
Lee Hinman 5c6d28240f Switch to Groovy as the default scripting language
This is a breaking change to move from MVEL -> Groovy
2014-06-25 12:15:12 +02:00
Boaz Leskes 051beb51a3 Version types `EXTERNAL` & `EXTERNAL_GTE` test for version equality in read operation & disallow them in the Update API
Separate version check logic for reads and writes for all version types, which allows different behavior in these cases.
Change `VersionType.EXTERNAL` & `VersionType.EXTERNAL_GTE` to behave the same as `VersionType.INTERNAL` for read operations.
The previous behavior was fit for writes but is useless in reads.

This commit also makes the usage of `EXTERNAL` & `EXTERNAL_GTE` in the update api raise a validation error as it make cause data to
be lost.

Closes #5663 , Closes #5661, Closes #5929
2014-04-25 23:06:12 +02:00
Boaz Leskes b7a95d11a7 Introduced VersionType.FORCE & VersionType.EXTERNAL_GTE
Also added "external_gt" as an alias name for VersionType.EXTERNAL , accessible for the rest layer.

Closes #4213 , Closes #2946
2014-03-10 21:07:17 +01:00
Clinton Gormley d70e6c4730 [SPEC] Updated docs URLs to point to master 2014-01-22 14:40:31 +01:00
Clinton Gormley d24994e4b4 [SPEC] Removed percolate from update 2014-01-16 15:29:50 +01:00
Spencer Alger 71d77d17e1 Updated the documentation urls in the rest api spec. 2014-01-09 14:44:14 -07:00
spenceralger 5ef83b6c9a Updated "version_type" to match delete.json 2013-10-30 17:26:32 -07:00
Clinton Gormley 2b91529c98 Added "version" param to delete and update 2013-06-20 11:34:18 +02:00
Karel Minarik 1096c6410c Added the API definition for updating a document 2013-05-27 23:57:02 +02:00
Karel Minarik 3a741444bb [SETUP] Changed, that `parts` and `params` API definitions are sorted alphabetically 2013-05-26 12:20:43 +02:00
Karel Minarik a55750dd70 [SETUP] Added the generated JSON skeleton files
Files were generated with the `thor api:generate:spec --force --verbose --crawl` command,
and based on the 0.90 branch (elasticsearch/elasticsearch@5ec4064).
2013-05-24 13:33:06 +02:00