I am attempting to make use of multi get to return a collection of strongly typed objects with source filtering and although I have been able to create the result I want with the JSON API for ElasticSearch, I am not sure how to translate it into the NEST 1.0 API.
This is the query I am trying to produce; it works correctly:
GET index/thing/_mget
{
"docs" : [
{
"_id": "00000000-0000-0000-0000-000000000030",
"_source": ["id", "name"]
},
{
"_id": "00000000-0000-0000-0000-000000000321",
"_source": ["id", "name"]
}
/* .... */
]
}
This is what I've been toying with but it does not actually filter the sources; instead, it's returning the full object:
client.MultiGet(s => s
.GetMany<Thing>(ids)
.SourceEnabled("id", "name"))
Any help would be appreciated. Also, it would be preferable to use a signature for the SourceEnabled()
call which is expression based (type safe), if one exists.