# Decorators: registry.register\_document vs INDEX.doc\_type

**URL:** <https://discuss.elastic.co/t/decorators-registry-register-document-vs-index-doc-type/312218>\
**Category:** Elasticsearch\
**Created:** [August 16, 2022, 8:17pm UTC](https://discuss.elastic.co/t/decorators-registry-register-document-vs-index-doc-type/312218 "2022-08-16T20:17:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scheung38](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scheung38/32/14795_2.png) [@scheung38](https://discuss.elastic.co/u/scheung38)\
**Post date:** [August 16, 2022, 8:17pm UTC](https://discuss.elastic.co/t/decorators-registry-register-document-vs-index-doc-type/312218/1 "2022-08-16T20:17:21Z")

</div>

Sometimes I see decorators:

```auto
from django_elasticsearch_dsl import Index
INDEX = Index(settings.ELASTICSEARCH_INDEX_NAMES[__name__])

@INDEX.doc_type

```

and

```auto
from django_elasticsearch_dsl.registries import registry
from articles.models import Article

@registry.register_document

```

what are the differences between the two decorators?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 13, 2022, 8:18pm UTC](https://discuss.elastic.co/t/decorators-registry-register-document-vs-index-doc-type/312218/2 "2022-09-13T20:18:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
