title: how to query with uncertainty a design view with complex nested keys
body: <p>I'm having access on a CouchDB view wich emits documents having keys of two arrays of four integers like <code>[[int, int, int, int], [int, int, int, int]]</code>. In a concrete example those correspond to start-date and end-date of the document:</p>
  
  <pre><code>[[2017, 5, 5, 10], [2017, 7, 2, 11]]
   Y      m  d  H     Y     m  d  H
  </code></pre>
  
  <h3>I'm able to get documents matching a period</h3>
  
  <pre><code>request="localhorst/dbname/_design/a/_view/period"
  request+="?key=\[\[2017,5,5,10\],\[2017,7,2,11\]\]"
  curl -sX GET $request
  </code></pre>
  
  <h3>Question: How to ignore the "hour" field H?</h3>
  
  <p>What if the boundaries are partially unknown? How to get all documents within a given period, like <code>2017-05-05</code> until <code>2017-07-02</code>? In other words, how can I ignore the last columns of each boundary?</p>
  
  <p>I tried to use <code>startKey</code> and <code>endKey</code></p>
  
  <pre><code>request="localhorst/dbname/_design/a/_view/period"
  request+="?startKey=\[\[2017,5,5\],\[2017,7,2\]\]"
  request+="&amp;endKey=\[\[2017,5,5,\{\}\],\[2017,7,2,\{\}\]\]"
  curl -sX GET $request
  </code></pre>
  
  <p>This does not work since it gets documents with the correct lower bound but the upper bound is wrong, e.g.:</p>
  
  <pre><code>[[2017,4,5,10],[2017,7,2,12]] &lt;- excluded,  OK
  [[2017,5,5,10],[2017,7,2,12]] &lt;- contained, OK
  [[2017,5,5,11],[2017,7,2,12]] &lt;- contained, OK
  [[2017,5,5,10],[2017,8,2,12]] &lt;- contained, ERROR
  </code></pre>