I'm building a simple autosuggest function as a standalone script (takes text as a URL parameter, returns JSON) using the very excellent elasticsearch-dsl python plugin.
Problem is, the import of the module slows the loading of the script:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, Q
...making it untenable for use as a traditional CGI for autosuggest (because speed is obviously the key).
Can anyone think of an easy-ish way for me to make this stay in memory? Perhaps make a small web app with flask? I'm kind of looking for path-of-least-resistance here