弹性搜索:{; quard; quast {root_cause;:[{type;

发布于 2025-02-01 18:37:37 字数 825 浏览 3 评论 0原文

时,我在弹性搜索中搜索索引时出现了此错误

当我在http:// localhost:9200/myserviceName prows prows prows prows prow是我的n.config文件***

    <target xsi:type="BufferingWrapper" name="ElasticSearch"
    flushTimeout="5000"/>
    <target name="elastic" xsi:type="ElasticSearch" index="myservicename"
            uri="http://localhost:9200"
            requireAuth="true"
     username="elastic"
     password="dd+A0Y=mmE1RgmIDoeHh"
            layout ="API:MyServiceName|${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" >
    </target>
</targets>
<rules>
    <logger name="*" minlevel="Debug" writeTo="elastic" />
</rules>

****

请告诉我我错了

This error comes when I searched the index in elastic search by http://localhost:9200/myservicename

following is my n.config file

    <target xsi:type="BufferingWrapper" name="ElasticSearch"
    flushTimeout="5000"/>
    <target name="elastic" xsi:type="ElasticSearch" index="myservicename"
            uri="http://localhost:9200"
            requireAuth="true"
     username="elastic"
     password="dd+A0Y=mmE1RgmIDoeHh"
            layout ="API:MyServiceName|${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" >
    </target>
</targets>
<rules>
    <logger name="*" minlevel="Debug" writeTo="elastic" />
</rules>

****

Please tell me where I am wrong

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

药祭#氼 2025-02-08 18:37:39

由于在Elasticsearch中未创建 /可用索引,因此发生此错误。请检查此文档

您可以使用下面的curl命令来创建索引:

curl -X PUT "localhost:9200/myservicename?pretty"

您可以使用以下命令来检查索引是否存在:

curl -X GET "localhost:9200/myservicename?pretty"

您也可以使用Postman Client进行相同的操作,并执行相同的API来创建索引。

This error is occurring because the index is not created / available in Elasticsearch. Please check this documentation.

You can create index using below curl command:

curl -X PUT "localhost:9200/myservicename?pretty"

You can used below command to check if index is exist or not:

curl -X GET "localhost:9200/myservicename?pretty"

You can also do same using Postman client and execute same API for creating index.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文