Connecting Bootstrap search box with Python based search engine

132 views Asked by At

I am attempting to integrate Elasticsearch as a search engine for my static website. I use the Python package "Lektor" as my static website generator. I have been able to automate indexing all my webpages into Elasticsearch. Additionally, I am using Bootstrap to have a navigation bar on the top of the website. I have added the relevant search bar code from Bootstrap and it looks exactly like I want it to. My issue is with connecting the Bootstrap search bar to my Python code that queries the Elasticsearch cluster I have set up. I am hoping to process the search bar data and send it as an argument to my Python querying function. Is this possible? I know how to do this with Flask and setting up an endpoint, but in this case, I do not know how to set a specific endpoint for search that reacts to the search bar's form data.

0

There are 0 answers