Connect Dash to Elastic search


We are using dash for a school project and had a question pertaining to linking text box with Elastic search.

Tech stack: Front end: Dash, Back end: Elastic search.

Use case description: We are building a person profiler. We will have a text box which will accept names. Let’s say Jeff Bezos. Once we enter the name of Jeff Bezos , a call is made to the Elastic index to get the information for Jeff Bezos. The information is then rendered on the dash web page. Similarly, if I enter Donald Trump’s information the same flow will follow suit.


  1. How do I connect the name in the text box to my Elastic search request.

I know that text box will be used to enter the name. I know how to execute the elastic search call. I don’t know how to connect the two.

Please advise how I can do this. Also if there is an existing example that I can refer to it would be really great.

You can simply use requests.get(https://your_url_to_es/_search?) to get the data in Python and then present it with Dash.

Hey thanks for replying. Yeah that I know :slight_smile: wanted to know how would the call look from Dash’s side. Any code snippet or example where such a thing happens. Even if not to elastic any back end would be good. I can understand and change the code.

I am late to the party, but this could help:

1 Like