Multitype searching

Hi,
I am trying to make a search on multitype idexe.
-my index is "dashboard" wich contains 2 types :

     -"logs" that contains the data coming from logstash
     -"productPrices" that contains the data coming from Mysql database (documents contain "code", "p_price") 

So, i am trying to to make an aggregation on field "code" in the log type and a sub aggregation on the field "p_price" wich is under the type "productPrices"

here the example :

localhost:9200/dashboard/_search
{
"size":0,
"aggs": {
"products": {
"terms": {
"field": "code",
},
"aggs": {
"prices": {
"terms": {
"field": "p_price",
"size": 3
}
}
}
}
}
}
}

i get an empty result for the prices aggregation

Thank you,

This won't work because your first bucket based on the code won't have any documents with the price field.

is there a way to get the documents code from the first type and search their price in the second type?

No because that is like a join, which ES cannot do.