Amazebot / bbot

An adaptable conversation engine for building bespoke bots.
MIT License
55 stars 2 forks source link

Mongo storage adapter could query sub-documents #61

Open timkinnane opened 6 years ago

timkinnane commented 6 years ago

By refactoring the storage model with data as sub-documents (instead of basic array), the adapter could perform mongo queries on sub-documents instead of getting the whole array back and filtering in-memory with javascript.

see https://github.com/Amazebot/bbot/blob/master/src/adapters/mongo.ts#L120