Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsert doesn't work for bulkCreate #75

Closed
alyrik opened this issue Mar 23, 2019 · 2 comments
Closed

Upsert doesn't work for bulkCreate #75

alyrik opened this issue Mar 23, 2019 · 2 comments

Comments

@alyrik
Copy link

alyrik commented Mar 23, 2019

Steps to reproduce

Pass array to create method with { upsert: true } params.

Expected behavior

It should create new items and update existing ones.

Actual behavior

Existing items are not updated.

System configuration

@feathersjs/feathers@3.3.1
feathers-elasticsearch@1.4.0
elasticsearch@15.4.1

NodeJS version:
v10.15.0

Operating System:
Debian

@othersideofphase
Copy link
Contributor

othersideofphase commented May 1, 2019

I came across this issue today, setting upsert: true while making a bulk create request tries to call create on a potentially already existing record giving:

  "_index": "index_name",
  "_type": "type_name",
  "_id": "2276654",
  "status": 409,
  "error": {
    "type": "version_conflict_engine_exception",
    "reason": "[type_name][2276654]: version conflict, document already exists (current version [4])",
    "index_uuid": "149AMdPPTHSo4LvC_bBrkw",
    "shard": "4",
    "index": "index_name"
  }
}

I created a small PR for this - can anyone help test

@daffl
Copy link
Member

daffl commented May 2, 2019

Closed via #78

@daffl daffl closed this as completed May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants