You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When searching for nested hits in large documents, it is a common use case to exclude the source document from the responses.
This is accomplished by:
{
"query": {
"nested": {
"path": "paragraphs",
"query": {
"match" : {
"paragraphs.content": {"query":"Rating"}
}
},
"inner_hits": {}
}
}, "_source": false
}
This .net client provides the appropriate property in the constructor for the SearchRequest: SearchRequest.Source which expects SourceConfig
which can also be constructed for the above usecase as new SourceConfig(false)
Execuiting that request fails with a not implemented exception:
Elastic.Transport.UnexpectedTransportException: The method or operation is not implemented.
---> System.NotImplementedException: The method or operation is not implemented.
at Elastic.Clients.Elasticsearch.Core.Search.SourceConfigConverter.Write(Utf8JsonWriter writer, SourceConfig value, JsonSerializerOptions options) in /_/src/Elastic.Clients.Elasticsearch/Types/SourceConfig.cs:line 63
which is indeed:
public override void Write(Utf8JsonWriter writer, SourceConfig value, JsonSerializerOptions options) => throw new NotImplementedException();
Please provide this simple converter.
The text was updated successfully, but these errors were encountered:
stevejgordon
changed the title
[Feature] SourceConfigConverter write not implemented
[FEATURE] SourceConfigConverter write not implemented
Jan 24, 2023
@p-erk I haven't been able to look in detail at this yet but agree we need to resolve it. I will categorise this as a bug for attention in a future patch release.
stevejgordon
changed the title
[FEATURE] SourceConfigConverter write not implemented
SourceConfigConverter Write Method Throws NotImplementedException
Jan 26, 2023
Describe the feature:
When searching for nested hits in large documents, it is a common use case to exclude the source document from the responses.
This is accomplished by:
{
"query": {
"nested": {
"path": "paragraphs",
"query": {
"match" : {
"paragraphs.content": {"query":"Rating"}
}
},
"inner_hits": {}
}
},
"_source": false
}
This .net client provides the appropriate property in the constructor for the SearchRequest:
SearchRequest.Source
which expects SourceConfigwhich can also be constructed for the above usecase as
new SourceConfig(false)
Execuiting that request fails with a not implemented exception:
which is indeed:
public override void Write(Utf8JsonWriter writer, SourceConfig value, JsonSerializerOptions options) => throw new NotImplementedException();
Please provide this simple converter.
The text was updated successfully, but these errors were encountered: