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

the return value of add document #1680

Open
Jerry-qmf opened this issue Jan 15, 2024 · 0 comments
Open

the return value of add document #1680

Jerry-qmf opened this issue Jan 15, 2024 · 0 comments

Comments

@Jerry-qmf
Copy link

Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.

Which version of Elastic are you using?

[ ] elastic.v7 (for Elasticsearch v7.0.32)

resp, err := client.Index().
Index(esName).
BodyJson(&esData).
Do(context.Background())

this behavior is success, but the return value is
resp=nil;
err={"_index":"***","_type":"_doc","_id":"Oa_VC40B0i7qMU2vSM3a","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":8,"_primary_term":1}

I think this correct return value is:
resp = {"_index":"***","_type":"_doc","_id":"Oa_VC40B0i7qMU2vSM3a","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":8,"_primary_term":1}
err = nil

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

1 participant