Say you are plotting a bar plot of top n items occurring in index 'A'. Additional information about these items, such as length of the item, is present in index 'B'. Plot a normalized histogram of count/length.
Can you give more details on how a document/item looks like in the index?
The document in index A looks as follows:
"id" : 100032, "name": 'Abcssd', "properties": ['g1','g2','g3','g4','g5']
The document in index B looks as follows:
"id" : 123, "name": 'g1', "length" : 10
I want a plot with
gi on the x-axis and the
(count of docs in index A containing gi)/(length of gi) on y-axis.
I know that joins are not possible in Elastic search, If this length information is sitting in an external database (postgres or a json file) , can it be accessed during the rendereing of the visualization?
This is not currently possible with the way the data works in Elasticsearch. You can just add a field in index A with the lenght of each property, in each document. With the way data is stored, it shouldn't increase the file size too much as it's redundant data.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.