title: CouchDB reduce error?
body: <p>I have a sample database in CouchDB with the information of a number of aircraft, and a view which shows the manufacturer as key and the model as the value.</p>
  
  <p>The map function is</p>
  
  <pre><code>function(doc) {
      emit(doc["Manufacturer"], doc._id)
  }
  </code></pre>
  
  <p>and the reduce function is</p>
  
  <pre><code>function(keys, values, rereduce){
      return values.length;
  }
  </code></pre>
  
  <p>This is pretty simple. And I indeed get the correct result when I show the view using Futon, where I have 26 aircraft of Boeing:</p>
  
  <pre><code>"BOEING"    26
  </code></pre>
  
  <p>But if I use a REST client to query the view using</p>
  
  <pre><code>http://localhost:6060/aircrafts/_design/basic/_view/VendorProducts?key="BOEING"
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>{"rows":[
      {"key":null,"value":2}
  ]}
  </code></pre>
  
  <p>I have tested different clients (including web browser, REST client extensions, and curl), all give me the value 2! While queries with other keys work correctly.</p>
  
  <p>Is there something wrong with the MapReduce function or my query?</p>