How to get Combined results on tooltip in kibana maps

I'm visualizing map on kibana-
guess if I have 4 layers on map

  1. shows the map for bihar state

2.shows the 10 pointers of hospitals in bihar.
(fields: No of hospital, Name of hospital)

  1. Shows no of doctors in each hospital.
    (field: No of Hospital, No of doctors)

4.Shows the name of specialist in each hospital.
(field: no of Hospital, Name of specialist)

and all this 3 files of details have a common field as Hospital_no

I want the the combined results for all layers in tooltip as-

No of hospital: 1
Name of hospital: city hospital
No of doctors: 10
Name of specialist : Ritika pawar

Is it possible to show the results in this way?

1 Like

Tooltips work only individually per geometry and layer so there's no direct way to do what you want.

The only option I see, apart from joining the data before indexing, is to create some transformation that puts together all the data using the enrich processor.

I would try to generate a new index with the hospitals with an associated ingest pipeline with enrich processors for doctors and specialists to basically "denormalize" your data structure.

You have a tutorial about the enrich processor here

Another way of joining your data is a transform. You can define all 3 inputs as source and group by Hospital_no. To pick the fields in the aggregation part you can use a top_metrics aggregation if you e.g. have some sort of timestamp in your data. Otherwise you have to write a script using scripted_metric. I strongly suggest top_metrics as I will explain below.

A transform writes results into a new index which you can easily query and create your tooltips. A transform can run in continuous mode, that means in case you update e.g. the name of a doctor, it can automatically update the combined index in the background. For such a self-updating solution you must have timestamps in your data. If you don't have timestamp you can create one at ingest as described here. And once you have timestamps you can use top_metrics for the aggregation part of the transform.

I hope this helps and isn't too overwhelming, if you are interested in transform, there is a UI which should help you to set this up and our documentation contains a lot of examples, including one for top_metrics.

1 Like

Sorry for the very late (better) response, and apologies for missing this but Elastic Maps does actually have a term join layer that you can use with your own data, check the documentation and try to use the top term aggregation to show the associated data

That should be a good full-browser solution to your issue.

Hope it helps, cheers!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.