I want to use R to load a collection from mongoDB to R, with filter to increase the speed. The filter can be Or condition or IN a R data.
MongoDB collection
Name Type
A M
B P
C M
D P
E O
RFilter
Criteria
M
P
RData <- MongoCollection$find('{"Type" in RFilter$Criteria}',
fields = '{
"Name" : true,
"Type" : true
}')
I expect the output: RData
Name Type
A M
B P
C M
D P