Binh, thank you for your response, I have created a similar test scenario 
and verified that I get the same results.  My question is why is ["bar"] an 
array object at all?  Under what conditions would it be possible to have a 
return value of "bar2" like my example below:

{
  "hits" : {
    "total" : 1,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "foo",
      "_type" : "bar",
      "_id" : "w34aAgVpQ9GJ0PJ4LqyYLQ",
      "_score" : 1.0,
      "fields" : {
        "foo" : [ "bar", "bar2" ]
      }
    } ]
  }
}

Thanks!

On Tuesday, February 18, 2014 9:55:20 AM UTC-6, Binh Ly wrote:
>
> For example, if you index a doc like this: 
>
> POST http://localhost:9200/foo/bar 
> { "foo": "bar" }
>
> And then you query like this:
>
> POST http://localhost:9200/foo/_search
> {
>   "fields": ["foo"]
> }
>
> Your result will now be like this in 1.0 (note that the value bar is 
> returned as an array ["bar"] instead of just a string "bar"):
>
> {
>   "hits" : {
>     "total" : 1,
>     "max_score" : 1.0,
>     "hits" : [ {
>       "_index" : "foo",
>       "_type" : "bar",
>       "_id" : "w34aAgVpQ9GJ0PJ4LqyYLQ",
>       "_score" : 1.0,
>       "fields" : {
>         "foo" : [ "bar" ]
>       }
>     } ]
>   }
> }
>
>

-- 
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/550a6264-e602-4beb-947d-e4786e5fe3f7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to