Little Problem


(Jeremy) #1

Hello,

i have a little problem with elastic search :

My doc looks like : (serialized as JSON doc)


Brandon
10


Monica
14

My search request :
{
"fields": ["user.age"],
"query": {
"bool" : {
"must" :
{ "multi_match" : {
"query" : "Brandon",
"fields" : [ ".name.$"] }
}
}
}
}

I got : 10 and 14 as result (all fields user.age in the doc)

I only want to get 14 ( the age of brandon)
Can we only get the field about the search field ?

( sorry for my english, i'm not ! :stuck_out_tongue: )


(system) #2