The "fields" option

Hi,

I'm trying to set the return fields in my search request using the
"fields" array. But nothing I do actually works:

"fields" : ["name", "location.city", "location.street"]

What am I missing here?

Thanks,
Matt

You need to map them as stored in the mapping definition. In general, it is
usually better to get back the actual json indexed and fetch what you want
from them, then loading several fields.

-shay.banon

On Sun, Aug 1, 2010 at 5:17 AM, matt mitchell goodieboy@gmail.com wrote:

Hi,

I'm trying to set the return fields in my search request using the
"fields" array. But nothing I do actually works:

"fields" : ["name", "location.city", "location.street"]

What am I missing here?

Thanks,
Matt

Ahh yes, makes sense. Thanks.

Matt

On Aug 1, 6:54 am, Shay Banon shay.ba...@elasticsearch.com wrote:

You need to map them as stored in the mapping definition. In general, it is
usually better to get back the actual json indexed and fetch what you want
from them, then loading several fields.

-shay.banon

On Sun, Aug 1, 2010 at 5:17 AM, matt mitchell goodie...@gmail.com wrote:

Hi,

I'm trying to set the return fields in my search request using the
"fields" array. But nothing I do actually works:

"fields" : ["name", "location.city", "location.street"]

What am I missing here?

Thanks,
Matt