简体   繁体   中英

How do I access data from ElasticSearch in AWS without Kibana?

I have been using AWS Firehose, Lambda and ElasticSearch to analyse and visualize Twitter data following this tutorial:

https://aws.amazon.com/blogs/big-data/building-a-near-real-time-discovery-platform-with-aws/

It works great and I can open the link to the Kibana dashboard and make the plots. However, I would like to display the plots in a custom built dashboard that I will build with HTML and javascript as part of a web app (I will use plotly.js to build plots).

How can I get the data from ElasticSearch into the javascript file to make the plots? Can I make the plots update in realtime like Kibana does

Is the endpoint an API? What javascript packages and commands do I need?

Do I even need ElasticSearch or could I just go straight from the S3 bucket which holds the streaming data into the app via a Lambda function? What are the advantages/disadvantages?

Please have a look at elastic apis

It's just a matter of consuming those APIs with any programmed ReST Client such as retrofit/okHttp etc.

A sample here : http://www.baeldung.com/elasticsearch-java

To implement this in JS , a simple call will serve your purpose : **Using JQuery

$.ajax({
    url: 'http://<yourElasticHost:port>/',
    type: '<GET/PUT/POST etc>',
    data: 'ID=1', //
    success: function() { alert('done !!'); }
});

ElasticSearch includes lots of search options and it is Document-oriented . If the access speed, Scalability, fine tune queries based on json dsl are your requirements then you can definitely go for elastic approach

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM