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

Docs: Document updates will add duplicate indexes #7918

Closed
realLiangshiwei opened this issue Mar 3, 2021 · 0 comments · Fixed by #7919
Closed

Docs: Document updates will add duplicate indexes #7918

realLiangshiwei opened this issue Mar 3, 2021 · 0 comments · Fixed by #7919

Comments

@realLiangshiwei
Copy link
Member

realLiangshiwei commented Mar 3, 2021

var existsResponse = await client.DocumentExistsAsync(DocumentPath<EsDocument>.Id(document.Id),

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html

Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.

We just need to use index API, if the document already exists, it will update the document.

@realLiangshiwei realLiangshiwei self-assigned this Mar 3, 2021
@realLiangshiwei realLiangshiwei added this to the 4.3-preview milestone Mar 3, 2021
@realLiangshiwei realLiangshiwei changed the title Docs: Search will get duplicate results Docs: Document updates will add duplicate indexes Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant