Question: How do you select only a few fields you want from Elasticsearch Query using C# in the Asp.Net Application?
[Elasticsearch source query] [elasticsearch fields query]
Please Login to see the rest of the answer
await _elasticClient.SearchAsync<MyModel> ( s => s.Source(sf => sf .Includes(i => i .Fields( f => f.MyField, f => f.Category, f => f.AnotherOne, f => f.Id, f => f.AnotherField ) ) )
If this helped you then leave us a comment below to let others know how helpful this was.
If you have a question related to this writing, drop us a comment below and will answer your question.