What difference between queries

What difference between this queries
100YWeatherSmall.data - collection

{“sections”:[“AG1”,“MD1”,“OA1”]}
1430 - results

and

{“sections”:{$all:[ “AG1”, “MD1”, “OA1”]}}
10200 - results

Please check this
https://docs.mongodb.com/manual/reference/operator/query/all/

Also check sections from output of below:
db.data.find({“sections”:[“AG1”,“MD1”,“OA1”]}).limit(5).pretty()
db.data.find( { “sections”: { $all: [ “AG1”, “MD1”, “OA1”] } } ).limit(5).pretty()

1 Like

Thank you. I understand.
db.data.find({“sections”:[“AG1”,“MD1”,“OA1”]}).limit(5).pretty() matches exact arrays in such order of elements.

db.data.find( { “sections”: { $all: [ “AG1”, “MD1”, “OA1”] } } ).limit(5).pretty()
matches arrays which contains all elements in query. Arrays also may contains more items