From 34c6e95a20ee735c78f4eb9463158ca1157a0a99 Mon Sep 17 00:00:00 2001 From: Israel Yago Pereira Date: Fri, 3 Sep 2021 09:43:28 -0300 Subject: [PATCH] Removed ES types --- src/indexer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/indexer.py b/src/indexer.py index a4843ce..023af24 100644 --- a/src/indexer.py +++ b/src/indexer.py @@ -3,8 +3,6 @@ from time import sleep from typing import List import post -doc_type = "post" - def connect_elastic(host='localhost', port=9200): MAXIMUM_ATTEMPS = 12 @@ -46,5 +44,5 @@ def index_posts(es: Elasticsearch, posts: List[post.Post], hash: str): index_name = get_index_name(post.lang, hash) - es.index(index=index_name, doc_type=doc_type, id=post.id, body=doc) + es.index(index=index_name, id=post.id, body=doc) print("Created doc for " + post.url) -- GitLab