My situation: we have a Shopify store, we also have a search engine implemented and hosted on AWS. We need to use that search engine instead of the default /search on our Shopify store.
Ideally, when users try to search something, their query (and potentially some other stuff like attribute selectors/checkboxes on the front end) will be passed to our search engine. Then after the result is back, they will be rendered at the front end.
My Question: how should I do this?
Option 1: modify the theme code, inject some javascript to call the search engine (Possible, but messy)
Option 2: write an app, wrap my search engine within the app, and somehow plug it in the store (I don't know how to do this)
Option 3: similar to Option 1, but write an app, use the app to inject some code to the theme, and somehow handle the work. (I don't know how to do this either)
I found a similar post here: Write custom search app in shopify but the answers below were more about filtering/modifying search result returned by the default shopify engine, I want to instead use my own search engine.