title: No Idea how to create a specific MapReduce in CouchDB
body: <p>I've got 3 types of documents in my db:</p>
  
  <pre><code>{
  param: "a",
  timestamp: "t"
  } (Type 1)
  
  {
  param: "b",
  partof: "a"
  } (Type 2)
  
  {
  param: "b",
  timestamp: "x"
  } (Type 3)
  </code></pre>
  
  <p>(I can't alter the layout...;-( )</p>
  
  <p>Type 1 defines a start timestamp, it's like the start event. A Type 1 is connected to several Type 3 docs by Type 2 documents. </p>
  
  <p>I want to get the latest Type 3 (highest timestamp) and the corresponding type 1 document.</p>
  
  <p>How may I organize my Map/Reduce?</p>