Description
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 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.