I am using MongoTemplate to execute my Mongo queries. I wanted to know if count works with limit set?
Also why find query searches full collection (according to query) although limit is set? For e.g. the query i wrote might result in having 10000 records, but i want only 100 records and for that i have set limit to 100 and then fired find query. But still query goes on to search full 10000 records.
dataQuery.limit(100);
List<logs> logResultsTemp = mongoTemplate1.find(dataQuery, logs.class);
Is their any limitations in using limit command?