you do not, MySQL Shell returns error 5115 Document is missing a required field . For more information see Understanding Document IDs. 

## Related Information 

## 20.3.3.3 Find Documents 

•See CollectionAddFunction for the full syntax definition. 

•See Understanding Document IDs. 

You can use the find()  method to query for and return documents from a collection in a schema. MySQL Shell provides additional methods to use with the find()  method to filter and sort the returned documents. 

MySQL provides the following operators to specify search conditions: OR  ( || ), AND  ( && ), XOR , IS , NOT , BETWEEN , IN , LIKE , != , <> , > , >= , < , <= , & , | , << , >> , + , - , * , / , ~ , and % . 

## Find All Documents in a Collection 

To return all documents in a collection, use the find()  method without specifying search conditions. For example, the following operation returns all documents in the countryinfo  collection. 

mysql-js> db.countryinfo.find() [ { "GNP": 828, "Code:": "ABW", "Name": "Aruba", "IndepYear": null, "geography": { "Continent": "North America", "Region": "Caribbean", "SurfaceArea": 193 }, "government": { "GovernmentForm": "Nonmetropolitan Territory of The Netherlands", "HeadOfState": "Beatrix" } "demographics": { "LifeExpectancy": 78.4000015258789, "Population": 103000 }, ... }  ] 240 documents in set (0.00 sec) 

The method produces results that contain operational information in addition to all documents in the collection. 

## Filter Searches 

An empty set (no matching documents) returns the following information: 

Empty set (0.00 sec) 

You can include search conditions with the find()  method. The syntax for expressions that form a search condition is the same as that of traditional MySQL Chapter 12, Functions and Operators . You must enclose all expressions in quotes. For the sake of brevity, some of the examples do not display output. 

