javascript - Can MongoDB aggregation query other documents? In other words: recursive search in mongodb's side, not client's -
in mongodb aggregation pattern can work on many documents , aggregate them in new data structures sorting, filtering, removing , adding elements, in order produce new documents retrieved query.
suppose, example, need find meaning of word in dictionary. if find word 'horse' in dictionary, i'll this: 'horse animal'. then, i'd know animal is, search again in dictionary meaning of 'animal'.
if in like, python, i'd have find meaning of 'dog', wait arrive, read , extract word animal. i'd have query meaning of 'animal', wait arrive, , on...
is there way delegate recursive task entirely mongodb, don't need query , wait each word? thought 'aggregate' solve, seems can map documents query new documents, not query data new ones
mongo db aggregation framework works in steps. first select data collection , apply group, match, project, sort etc., on selected data set. data transformed based on operation applied on @ each step. next step gets transformed data previous one. asking requires complete data set @ each instance , means firing query data base not case here.
you can use aggregation framework, when can select complete set or subset of data collection , work on transforming in each step.
Comments
Post a Comment