title: couchdb search or filtering on key array
body: <p>I have this in my view function:</p>
  
  <pre><code>emit([doc.address.country,doc.address.state, doc.address.city], doc);
  </code></pre>
  
  <p>When I query the search, I need to have all 3 elements of the array filled in, for example:</p>
  
  <pre><code>?key=["US","NY","New York"]
  </code></pre>
  
  <p>that will produce my records, but lets say for example, I just want to return everything in the US for example:</p>
  
  <pre><code>?key=["US"]   
  </code></pre>
  
  <p>or in the US and State... </p>
  
  <pre><code>?key=["US","NY"] 
  </code></pre>
  
  <p>OR... lets say perhaps I want just all records from NY... (i know the below doesn't work)</p>
  
  <pre><code>?key=["","NY"]
  </code></pre>
  
  <p>I don't really get how to search if you want to leave one of the elements of the array empty?</p>