I am trying to find a good way to search for data in a big database. I have an API which get the entire list of data from MongoDB
.get(function(req, res) {
drinks.find({ }, function(err, drinksOrders) {
if (err) {
res.send(err);
return;
}
res.json(drinksOrders);
});
});
And i have ng-repeat to display those data with some filters.
**Question 1 - ** if my database files is 1gb, before the page load, will the page wait until res.json(drinksOrders) have been completely downloaded?
**Question 2 - ** if the page is loading dynamically without having to wait for the big json file to load, how would my search filter behave? So if in my search field "cola", this query will stand and angular will continuously download json and filtering out and displaying "cola" only?
**Question 3 - ** Using angular limitTo, will this only download part of json files to a certain limit.
Thank you