请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

elasticsearch-dsl 版本6.3.1 其中, elasticsearch 6.5.4 kibana 6.5.4,但是报错

-- coding: utf-8 --

author = “bobby”

from datetime import datetime
from elasticsearch_dsl import Document, Date, Nested, Boolean, analyzer, InnerDoc, Completion, Keyword, Text, Integer

from elasticsearch_dsl.connections import connections
connections.create_connection(hosts=[“localhost”])

class ArticleType(Document):
#伯乐在线文章类型
title = Text(analyzer=“ik_max_word”)
create_date = Date()
url = Keyword()
url_object_id = Keyword()
front_image_url = Keyword()
front_image_path = Keyword()
praise_nums = Integer()
comment_nums = Integer()
fav_nums = Integer()
tags = Text(analyzer=“ik_max_word”)
content = Text(analyzer=“ik_max_word”)

class Meta:
    index = "jobbole"
    doc_type = "article"

if name == “main”:
ArticleType.init()

报错:
Traceback (most recent call last):
File “C:/Users/admin/PycharmProjects/ArticleSpider/ArticleSpider/models/es_types.py”, line 32, in
ArticleType.init()
File “C:UsersadminEnvspy3scrapylibsite-packageselasticsearch_dsldocument.py”, line 138, in init
i.save(using=using)
File “C:UsersadminEnvspy3scrapylibsite-packageselasticsearch_dslindex.py”, line 289, in save
current_settings = self.get_settings(using=using)[self._name][‘settings’][‘index’]
KeyError: ‘*’

Process finished with exit code 1

正在回答 回答被采纳积分+3

2回答

bobby 2019-01-12 16:52:37

你加我qq 442421039 我看看

0 回复 有任何疑惑可以回复我~
  • 老师,我也出现了这个问题,请问要怎么解决呢?
    回复 有任何疑惑可以回复我~ 2019-02-11 10:50:48
  • 老师,版本问题已解决
    回复 有任何疑惑可以回复我~ 2019-02-11 11:32:28
  • bobby 回复 慕粉9451062 #3
    好的,
    回复 有任何疑惑可以回复我~ 2019-02-12 18:53:48
提问者 慕后端2376581 2019-01-10 22:19:51

elasticsearch 6.5.4
kibana 6.5.4

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信