This just got answered:

You should be able to specify "_source" in the "fields"

Example:

{
  "fields": [
    "_parent",
    "_source"
  ],
  "query": {
    "terms": {
      "Id": [
        "12738"
      ]
    }
  }}



On Friday, June 20, 2014 11:52:49 AM UTC-7, Vinay Pandey wrote:
>
> I have the following structure on my ElasticSearch:
>
>     {
>         _index: 3_exposureindex
>         _type: exposuresearch
>         _id: 12738
>         _version: 4
>         _score: 1
>         _source: {
>             Name: test2_update
>             Description:
>             CreateUserId: 8
>             SourceId: null
>             Id: 12738
>             ExposureId: 12738
>             CreateDate: 2014-06-20T16:18:50.500
>             UpdateDate: 2014-06-20T16:19:57.547
>             UpdateUserId: 8
>         }
>         fields: {
>             _parent: 1
>         }
>     }
>
>
> I am trying to get both, the data in `_source` as well as that in 
> `fields`, when I run the query:
>
>     {
>       "query": {
>         "terms": {
>           "Id": [
>             "12738"
>           ]
>         }
>       }
>     }
>
>
> All I get are the values contained in `_source`, whereas, if I run the 
> query:
>
>     {
>       "fields": [
>         "_parent"
>       ],
>       "query": {
>         "terms": {
>           "Id": [
>             "12738"
>           ]
>         }
>       }
>     }
>
>
> Then I only the `fields`. Is there a way to get both? I will be grateful 
> for any help.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/00e590cf-352d-4ebf-800d-113565ee7fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to