title: Projection using MongoEngine Raw-Query
body: <p>Does anyone know, how I can implement the following MongoDB query using a MongoEngine Raq-Query?</p>
  
  <pre><code>db.getCollection('subscribers').find({
      '_id': ObjectId("579e60b0c525fd2037e8dd31"),
      'history.content.read_process_msg': { 
          '$exists':true
       },
       'history.content.read_processed': { 
          '$exists':true
       },
       'history.content.read_processed': false
   },
   {'history.$':1})
  </code></pre>
  
  <p>I read, that the raw-query doesn't support projections and that one should use <code>.only()</code> instead. But the problem here is, that it returns all the empty documents also…</p>
  
  <p>Any advice?</p>
  
  <p>Edit: Here are my models and a sample document:</p>
  
  <pre><code>class Subscriber(Document):
      service = StringField()
      history = EmbeddedDocumentListField('SubscriberHistory')
  
      def __str__(self):
          return self.service
  
  
  class SubscriberHistory(EmbeddedDocument):
      action = StringField()
      content = DictField()
  
      def __str__(self):
          return self.action
  </code></pre>
  
  <p>And the sample:</p>
  
  <pre><code>{
      "_id" : ObjectId("579e60b0c525fd2037e8dd31"),
      "service" : "foo",
      "history" : [ 
          {
              "action" : "outbound",
              "content" : {
                  "read_processed" : false,
                  "message_data" : {
                      "text" : "w00t?"
                  },
                  "read_process_msg" : {
                      "$ref" : "bots_messages",
                      "$id" : ObjectId("57a6529dc525fd8066ee25b3")
                  }
              },
              "created_at" : ISODate("2016-08-06T21:12:00.986Z")
          }
      ]
  }
  </code></pre>