Suppose I have a collection of companies that contains fields such as phone, name, companyName, email. I want the admin to search on the basis of either phone, name or email.
You will find the document for find() at https://docs.mongodb.com/manual/reference/method/db.collection.find/
I would also recommend that you take the course M001 from https://university.mongodb.com/
Adding to the question, I know the basic find query, I should have mentioned in question that I want to make search on the basis of one of the fields at a time with regular expressions kind of thing. Like if Ama is typed then results starting with Ama would appear in email field, or like if 9465 is typed then companies whose phoneNo starts from 9465 would be returned.