解决:Unable to identify index name. XXXModel is not a Document. Make sure the document class is annota

Posted 微风--轻许--

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决:Unable to identify index name. XXXModel is not a Document. Make sure the document class is annota相关的知识,希望对你有一定的参考价值。

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

1. 往 elasticsearch 写入数据调用 index 方法,执行报错:

Unable to identify index name. XXXModel is not a Document.
 Make sure the document class is annotated with @Document(indexName="foo")

2. 原因:XXXModel 实体类上少注解, 加上此注解就可:

@Document(indexName = "cxx_es", type = "cxx_es")

 

以上是关于解决:Unable to identify index name. XXXModel is not a Document. Make sure the document class is annota的主要内容,如果未能解决你的问题,请参考以下文章

Unable to Dequeue viewForSupplementaryElementOfKind '未检索到返回的视图'

AMD Ryzen 9 7950x 16-Core Processor安装proxmox提示unable to connect to x serverf

AMD Ryzen 9 7950x 16-Core Processor安装proxmox提示unable to connect to x serverf

unable to inject dll into target怎么解决?

[python] disconnected: unable to connect to renderer解决方法

解决OutOfMemoryError: unable to create new native thread