简体   繁体   中英

How to fetch data from elasticsearch into java servlet?

I'm making an application with react on the front end and java(dynamic web application with tomcat server) in the backend. I have some data stored in elasticsearch which I want to fetch into java and send them to react frontend. Got no ideas how to perform it. Any resources or some high level ideas will be greatly appreciated.

Thanks

I think you should use the following technology chain:

  1. AJAX for making a rest call with JSON (browser)
  2. JAX-RS for getting JSON requests (server)
  3. Business service for getting data from elasticsearch (server)
  4. JAX-RS for sending JSON response (server)
  5. AJAX for receiving data (browser)
  6. React for rendering received data (browser).

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