I am using firebase for data storage. The data structure is like this:
products:{
product1:{
name:\"chocolate\",
}
product2:{
name:\"cho
The elastic search solution basically binds to add set del and offers a get by wich you can accomplish text searches. It then saves the contents in mongodb.
While I love and reccomand elastic search for the maturity of the project, the same can be done without another server, using only the firebase database. That's what I mean: (https://github.com/metaschema/oxyzen)
for the indexing part basically the function:
in the oxyzen implementation, subsequent updates of the document ACTUALLY reads the index and updates it, removing the words that don't match anymore, and adding the new ones.
subsequent searches of words can directly find documents in the words child. multiple words searches are implemented using hits