MultiGet with fields to return


(alexander.bau@unister-gmbh.de) #1

Hi,

is it possible to specify the fields to return in a MultiGet (like it
is in a regular Get)?

If not: is it planned to implement this feature in a future release?

Regards,

Alex


(J├╝rgen kartnaller) #2

It is implemented:

MultiGetRequestBuilder request = client.prepareMultiGet();
for (String id : ids) {
request.add(new MultiGetRequest.Item("users", "calculated",
id).fields("network_impact"));
}
MultiGetResponse result = request.execute().actionGet();

On Thu, Aug 25, 2011 at 4:21 PM, alexander.bau@unister-gmbh.de <
alexander.bau@unister-gmbh.de> wrote:

Hi,

is it possible to specify the fields to return in a MultiGet (like it
is in a regular Get)?

If not: is it planned to implement this feature in a future release?

Regards,

Alex


(alexander.bau@unister-gmbh.de) #3

Oh, I've accidentally overlooked this in the Java docs.

Thank you.

Alex


(Shay Banon) #4

Its not documented on the REST API, it will be once I can push again to
github: http://www.elasticsearch.org/guide/reference/api/multi-get.html.

I remember one thing I did not like about it, which is the verbosity of this
case. I will fix that:
https://github.com/elasticsearch/elasticsearch/issues/1281.

On Thu, Aug 25, 2011 at 5:21 PM, alexander.bau@unister-gmbh.de <
alexander.bau@unister-gmbh.de> wrote:

Hi,

is it possible to specify the fields to return in a MultiGet (like it
is in a regular Get)?

If not: is it planned to implement this feature in a future release?

Regards,

Alex


(system) #5