title: How do I include all fields for my elasticsearch project?
body: <p>I am trying to implement elasticsearch into my project. Right now it is able to search through the response field in my Response table, but i also want to be able to search through the other fields e.g. Question, Topics, Clients.</p>
  
  <p>When i try to add in "Question" under fields, my site breaks.</p>
  
  <p>documents.py:</p>
  
  <pre><code>from django_elasticsearch_dsl import DocType, Index, fields
  from app.models import Response
  
  @response_index20.doc_type
  class ResponseDocument20(DocType):
      class Meta:
          model = Response
  
  
          fields = [
              'Response',
              #'Question',
          ]
  </code></pre>
  
  <p>models.py:</p>
  
  <pre><code>class Response(models.Model):
      Question = models.ForeignKey(Question, default=436, on_delete=models.CASCADE)
      Topic = models.ForeignKey(Topic, default=13, on_delete=models.CASCADE)
      Response = models.TextField()
      Client = models.ForeignKey(ClientDetail, default=8, on_delete=models.CASCADE)
      Planit_location = models.ForeignKey(Planit_location, default=1, on_delete=models.CASCADE)
      Image = models.ForeignKey(Image, default=0, on_delete=models.CASCADE)
      Date_added = models.DateField(default=datetime.date.today)
  
      def __str__(self):
          return self.Response
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>from app.documents import ResponseDocument20
  
  @login_required(login_url="/login/")
  def search_es20(request):
      q = request.GET.get('q')
      if q:#ES
          responses = ResponseDocument20.search().query("wildcard", Response=q)#ES
      else:#ES
          responses = ''#ES
  
      return render(request, 'app/search_es20.html', {
          'responses': responses,
          'query': q,
      })
  </code></pre>