提问要多花一点心思哦

es 多type 数据结合查询

Elasticsearch | 作者 saga | 发布于2017年09月13日 | 阅读数:2871

有两个数据类型,
一个是新进货物:
POST  /goods_2-2017-09-12/goodsin
{
  "@timestamp" : "2017-09-12T13:00:00Z",
  "orderid" : "6577712",
  "price" : "29.99",
  "channel" : 2
}
 
一个是货物售出:
POST  /goods_2-2017-09-12/goodsout
{
  "@timestamp" : "2017-09-12T15:00:00Z",
  "orderid" : "6577712",
  "price" : "39.99"
}
 
1.想查出当天新入货物出售数量,从这个数据上改怎么查?
2.想查出昨天进货在今天还剩余的百分比,这个又该怎么查?
 
已邀请:

要回复问题请先登录注册