0

I was reading this article of mongodb on Indexing and Performance . In this when they are performing any find query like db.names.find( {"name": "Arya"} ).sort( {"year": 1} ) They are showing some log messages which gives details about query. I dont know how how is the log message is printed , I tried to connect my mondodb free sandbox database from mongo shell. On executing the find query its prints the result but no log message . Pls see here what I mean by log message.

Plesae help me how to see log message. Any help will be appreciated.Thanks.

Community
  • 1
  • 1
  • The log message you are talking about shows up in the server logs not on the mongo shell. As such you can run `.explain` on find query to see the the index information. More info here https://docs.mongodb.com/v3.2/reference/method/db.collection.explain/#db-collection-explain – s7vr Apr 19 '17 at 18:40
  • @Veeram Just to inform my server is in heroku and I am using Node js server. I did one find query but when i saw logs in server using :heroku logs it didnt show any such log message. – Bhupendra Singh Chauhan Apr 19 '17 at 20:56

0 Answers0