Okay, so now here's where I am - I read up on upsert and crafted my bulk
stack. It seems to work:
{"update":{"_index":"aftermarket-2014-08-11_02-38-19","_type":"premium","_id":"kryptonblue.com"}}
{"script" : "ctx._source.auctionid=6623102; ctx._source.auctiontype=18;
ctx._source.auctionstatus=4; ctx._source.auctionprice=4488;
ctx._source.auctionendtime='Oct 7 2014 09:10:00:000AM';
ctx._source.auctionadult=false;", "upsert": { "auctionid": 6623102,
"auctiontype": 18, "auctionstatus": 4, "auctionprice": 4488, "auctionendtime":
"Oct 7 2014 09:10:00:000AM", "auctionadult": false, "domaintype": "auction",
"sld": "kryptonblue", "tld": "com", "vendorid": 0, "price": 0,
"commissionrate": 0, "isfasttransfer": false, "tokens": ["krypton","blue"]}}
This seems to do the right thing. Here's the result I get back:
[0] => stdClass Object
(
[update] => stdClass Object
(
[_index] => aftermarket-2014-08-11_02-38-19
[_type] => premium
[_id] => kryptonblue.com
[_version] => 1
[status] => 201
)
)
This was done as an insert - there was nothing to update. So 201 seems right.
What can I expect on an update? A straight 200?
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/7adfadae-d06e-4523-b860-a2d3e2cba1c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.