from django_elasticsearch_dsl import DocType, GeoPointField

from mainapp.documents.utils import mainIndex
from mainapp.models import File


@mainIndex.doc_type
class FileDocument(DocType):
    coordinates = GeoPointField(attr="coordinates")

    class Meta:
        model = File

        fields = [
            'id',
            'name',
            'description',
            'displayed_filename',
            'created',
        ]

from django_elasticsearch_dsl import DocType, GeoPointField

from mainapp.documents.utils import mainIndex
from mainapp.models import File


@mainIndex.doc_type
class FileDocument(DocType):
    coordinates = GeoPointField(attr="coordinates")

    class Meta:
        model = File

        fields = [
            'id',
            'name',
            'description',
            'displayed_filename',
            'parsed_text',
            'created',
        ]

Put parsed_text into the full-text search index
Put parsed_text into the full-text search index

  from django_elasticsearch_dsl import DocType, GeoPointField
  
  from mainapp.documents.utils import mainIndex
  from mainapp.models import File
  
  
  @mainIndex.doc_type
  class FileDocument(DocType):
      coordinates = GeoPointField(attr="coordinates")
  
      class Meta:
          model = File
  
          fields = [
              'id',
              'name',
              'description',
              'displayed_filename',
+             'parsed_text',
              'created',
          ]
  
Put parsed_text into the full-text search index
## Code Before:
from django_elasticsearch_dsl import DocType, GeoPointField

from mainapp.documents.utils import mainIndex
from mainapp.models import File


@mainIndex.doc_type
class FileDocument(DocType):
    coordinates = GeoPointField(attr="coordinates")

    class Meta:
        model = File

        fields = [
            'id',
            'name',
            'description',
            'displayed_filename',
            'created',
        ]

## Instruction:
Put parsed_text into the full-text search index
## Code After:
from django_elasticsearch_dsl import DocType, GeoPointField

from mainapp.documents.utils import mainIndex
from mainapp.models import File


@mainIndex.doc_type
class FileDocument(DocType):
    coordinates = GeoPointField(attr="coordinates")

    class Meta:
        model = File

        fields = [
            'id',
            'name',
            'description',
            'displayed_filename',
            'parsed_text',
            'created',
        ]
