Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. { _index: 'makes',
  2. _type: 'make',
  3. _id: '55b8cdbae36236490d00002a',
  4. status: 409,
  5. error: 'VersionConflictEngineException[[makes][0] [make][55b8cdbae36236490d00002a]: version conflict, current [168], provided [167]]' }
  6.  
  7. var conditions = [];
  8. conditions.push({
  9. update: {
  10. _index: config.elasticSearch.index,
  11. _type: config.elasticSearch.type,
  12. _id: id
  13. }
  14. });
  15. conditions.push({
  16. doc: {
  17. published: true
  18. }
  19. });
  20. client.bulk({
  21. body: conditions
  22. }, function(err, resp) {
  23. console.log(resp);
  24. console.log(resp.items[0].update);
  25. return res.send({success: true, message: "Shows updated successful"})
  26. });
  27.  
  28. [ { update:
  29. { _index: 'makes',
  30. _type: 'make',
  31. _id: '55b8cdbae36236490d00002a' } },
  32. { doc: { published: true } } ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement