Match docs having all array element within $gte $lte
<p>Here are my example documents:</p>

<pre><code>{
updated: [
    1461062102,
    1461062316
],
name: "test1",
etc: "etc"
}

{
updated: [
    1460965492,
    1461060275
],
name: "test2",
etc: "etc"
}


{
updated: [
    1461084505
],
name: "test3",
etc: "etc"
}

{
updated: [
    1461060430
],
name: "test4",
etc: "etc"
}

{
updated: [
    1460965715,
    1461060998
],
name: "test5",
etc: "etc"
}
</code></pre>

<p>What is the correct usage of find query to fetch all documents matching updated date within <code>$gte</code> and <code>$lte</code> criteria?</p>

<p>for example</p>

<pre><code>db.test.find({'updated':{$elemMatch:{$gte:1461013201,$lte:1461099599}}})
</code></pre>

<p>I can use $or and set it it like <code>updated.0:{$gte:1461013201,$lte:1461099599}</code>, <code>update.1:{$gte:1461013201,$lte:1461099599}</code> etc but what if my array will contain more updated dates?</p>

<p>As I understand $elemMatch doesnt' fit my criteria because it only matches the first occurence in array.</p>