I have products with array of stores containing store_id and the price of
the product for the store
{
label: " product 1 "
stores: [
{store_id: 1, price:1.0},
{store_id:2, price: 2.0}
]
}
{
label: " product 2 "
stores: [
{store_id: 1,price: 12.0},
{store_id: 2, price: 22.0}
]
}
I search all the products present in store 2.
{
"query": {
"match": {
"stores.store_id": "2"
}
}
}
however I wont know the associated price since all the prices with all the
associated stores will be returned.
How to retrieve only the price of the store_id 2 , and not get all the
prices?
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fbc69f17-0ef9-4b15-80ed-736754bdefcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.