We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I do (in F#):
type DocType = { Id : string ; Name : string } let myDoc = { Id = null; Name = "foo" } client.Index(IndexRequest(DocumentPath(myDoc)))
then the request that gets generated is
PUT /doctype/doctype/ { body }
which causes an "Invalid Request" error from ElasticSearch (2.1.1). The request should be:
POST /doctype/doctype/ { body }
The problematic code is at line 20 of https://github.com/elastic/elasticsearch-net/blob/82c938893b2ff4ddca03a8e977ad14a16da712ba/src/Nest/Document/Single/Index/IndexRequest.cs
protected override HttpMethod HttpMethod => ((IIndexRequest<TDocument>)this).Id == null ? HttpMethod.POST : HttpMethod.PUT;
The Id property here is Nest.Id object wrapped around the document itself. Its GetString() method will return null, but the object itself is not null.
Id
Nest.Id
GetString()
null
The text was updated successfully, but these errors were encountered:
1166d8e
No branches or pull requests
If I do (in F#):
then the request that gets generated is
which causes an "Invalid Request" error from ElasticSearch (2.1.1). The request should be:
The problematic code is at line 20 of https://github.com/elastic/elasticsearch-net/blob/82c938893b2ff4ddca03a8e977ad14a16da712ba/src/Nest/Document/Single/Index/IndexRequest.cs
The
Id
property here isNest.Id
object wrapped around the document itself. ItsGetString()
method will returnnull
, but the object itself is notnull
.The text was updated successfully, but these errors were encountered: