0

I have some documents that I imagine like those:

{
timestamp: "2017-11-12T00:00:00",
samples: [
  {
     param: "Temperature",
     value: 76.3
  },
  {
     param: "Pressure",
     value: 12.3
  }
 ]
}

I'd like to plot temperature vs pressure. and even better, aggregate the temperature for pressure ranges (avg for pressure between 0-5, 5-10, 10-15, tc...) How can I do this?

I could have done this:

{
  timestamp: "2017-11-12T00:00:00",
  "Temperature": 76.3
  "Pressure": 12.3
}

but it is not really convenient because

  • I can have thousands of fields like temperature or pressure
  • I don't know the name of parameters a priori, therefore I cannot figure out how to make the mappings before inserting.

Any suggestion?

dao hodac
  • 361
  • 2
  • 5
  • 14

1 Answers1

0

In demand since March 2014 :(

Q:

So can someone clarify this; In this post (https://www.elastic.co/blog/kibana-4-beta-1-released) for Kibana4beta1 it states that "Kibana 4 brings the power of Elasticsearch's nested aggregations to the click of a mouse. " However I'm unable to create any visualizations on documents with nested objects. I've also made sure the nested objects in my index template are marked as "nested". So is Kibana's support for nested aggregations not the same as ES's support for nested objects? What am I missing? Thanks.

A:

I think they're using "nested" here to refer to grouping via multiple fields, eg "aggregate by time then geo" (not "nested" as in its use in the platform for "nested objects")

kimchy (Elasticsearch's creator) commented on March 31, 2016

hey, chiming in. I chatted to Rashid about this, and while I feel the pain of users wanting to use Kibana for nested mappings, supporting it in a more general manner (that might imply additional features in Elasticsearch level itself) is the path forward that maintains the flexibility we need to have in Kibana. While getting this suggested change in might solve the short term problem of not supporting nested, it will prove to be problematic down the road.

I head and feel the need here for Kibana to support nested, but this is one of those cases where if it is not obvious how it needs to be solved, it is better to leave it unsolved until we have a solution that feels natural. We definitely need to continue and explore that, one of those, which we chatted in different places, is automatically supporting nested (wrapping and so on) in ES itself.

NikoNyrh
  • 3,578
  • 2
  • 18
  • 32