let's consider the following data
POST /sales/forecast/ {"product":"banana","state":"unsure","price":10, "@timestamp": "2018-06-20T10:00:00.000Z" }
POST /sales/forecast/ {"product":"banana","state":"confirmed","price":20, "@timestamp": "2018-06-20T11:00:00.000Z" }
POST /sales/forecast/ {"product":"banana","state":"confirmed","price":40, "@timestamp": "2018-06-21T10:00:00.000Z" }
POST /sales/forecast/ {"product":"banana","state":"confirmed","price":30, "@timestamp": "2018-06-21T11:00:00.000Z" }
POST /sales/forecast/ {"product":"orange","state":"confirmed","price":1, "@timestamp": "2018-06-20T12:00:00.000Z" }
POST /sales/forecast/ {"product":"orange","state":"unsure","price":2, "@timestamp": "2018-06-20T13:00:00.000Z" }
POST /sales/forecast/ {"product":"orange","state":"confirmed","price":4, "@timestamp": "2018-06-21T12:00:00.000Z" }
POST /sales/forecast/ {"product":"orange","state":"confirmed","price":3, "@timestamp": "2018-06-21T13:00:00.000Z" }
POST /sales/forecast/ {"product":"lemon","state":"unsure","price":3, "@timestamp": "2018-06-20T14:00:00.000Z" }
POST /sales/forecast/ {"product":"lemon","state":"unsure","price":5, "@timestamp": "2018-06-20T15:00:00.000Z" }
POST /sales/forecast/ {"product":"lemon","state":"unsure","price":7, "@timestamp": "2018-06-21T14:00:00.000Z" }
POST /sales/forecast/ {"product":"lemon","state":"unsure","price":8, "@timestamp": "2018-06-21T15:00:00.000Z" }
using timelion I want to know the precentage of banana I am sure to sell:
.es(q="+state=confirmed +product=banana",index=sales*,metric=sum:price).divide(.es(q="product=banana",index=sales*,metric=sum:price)),
same goes for lemon and orange
let say I want to use "split" to get these graph:
.es(q="+state=confirmed",index=sales*,metric=sum:price,split=product.keyword:3).divide(.es(q="*",index=sales*,metric=sum:price, split=product.keyword:3)),
this timelion code answer : Unable to pairwise reduce seriesLists, number of series are not the same
if I change the split factor 3 to 2 for example I get : Matching series could not be found for "orange" in ["banana","lemon"].
- is this a bug (or lack of functionality)
- if yes, could it be fixed (or is it by design)
- is there a workaround that would work if a new products arrive without me changing my dashboard each time a new products arrives