<code class="language-javascript"><span class="hl-2">// Assuming that our documents look like:</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">documents</span><span class="hl-1"> = [</span><br/><span class="hl-1">  { </span><span class="hl-0">id:</span><span class="hl-1"> </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-0">title:</span><span class="hl-1"> </span><span class="hl-4">&#39;Moby Dick&#39;</span><span class="hl-1">, </span><spa