Firebase: Backend search engine choices

I’m making an app that will have a search engine component: users can upload content and other users can search for it, ideally by keywords, related terms, etc. My question is what’s the best way to do that.

I’m planning to implement the backend mostly in firebase. I could do table scans with firebase queries, but it seems like it would be pretty taxing on the framework and not really what it’s designed for. What’s the right way to solve this problem? Thanks!

One solution could be Elasticsearch:
https://github.com/firebase/flashlight
http://firebase.github.io/flashlight/

Alternative (and also Algolia):
https://github.com/deltaepsilon/firebase-search

For special cases there are special solutions like this one:
http://stackoverflow.com/a/40633692 (autosuggest search)