title: How to return a field from a ScoredDocument in GAE Search API - Python
body: <p>I'm having trouble getting a specific document field out of a ScoredDocument. This must be very simple, but the documentation doesn't seem to cover it. </p>
  
  <p>I've properly created an index, Documents in the index and searched the documents with results. The Documents just have a title property and a note property. How do I get the title or the note out? This is the server code:</p>
  
  <pre><code>class SearchHandler(webapp2.RequestHandler):
  def get(self):
      index = search.Index(name="myIndex")
      query_string = "dog" 
      try:
          results = index.search(query_string) 
          logging.info(results)
          self.response.out.write("""&lt;html&gt;&lt;body&gt;
          Here are the results from the search for "dog":""")
          # Iterate over the documents in the results
          for note in results:
              self.response.out.write(note.fields)
              self.response.out.write(note.fields.title) # HERE IS PROBLEM
          self.response.out.write("&lt;/body&gt;&lt;/html&gt;")
      except search.Error:
          logging.exception('Search failed')
  </code></pre>
  
  <p>The output without trying to get the title is correct and I get a ScoredDocument field:</p>
  
  <pre><code>[search.TextField(name=u'title', value=u'A note with a dog'),     search.TextField(name=u'note', value=u'hamster'), search.DateField(name=u'updated', value=datetime.datetime(2014, 4, 10, 0, 0)), search.DateField(name=u'created', value=datetime.datetime(2014, 4, 10, 0, 0))] 
  </code></pre>
  
  <p>The error for trying to get the title this way is this:
      in get self.response.out.write(note.fields.title)
      AttributeError: 'list' object has no attribute 'title'</p>
  
  <p>Can anyone help with this?
  Thanks</p>