无法为Elasticsearch查询找出我们的错误400

轻的

我只是尝试使用弹性搜索,然后运行了以下查询:

curl -XPOST "http://host/logstash-2016.05.19/_search" -d'

{
  "query": {
        { "match": { "serviceName": "systemA" } }
  }
}'

但继续出现此错误:

{
   "error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[hTYqYg0RSt2XZrYWxwMQ3g][logstash-2016.05.19][0]: RemoteTransportException[[es1][inet[/10.149.76.25:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[logstash-2016.05.19][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n  \"query\": {\n        { \"match\": { \"serviceName\": \"bsHolds\" } }\n  }\n}\n]]]; nested: QueryParsingException[[logstash-2016.05.19] Failed to parse]; nested: JsonParseException[Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: UNKNOWN; line: 3, column: 10]]; }{[asrIxDjBSJeKvDTT7zfgMQ][logstash-2016.05.19][1]: RemoteTransportException[[es5][inet[/10.149.76.155:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[logstash-2016.05.19][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n  \"query\": {\n        { \"match\": { \"serviceName\": \"bsHolds\" } }\n  }\n}\n]]]; nested: QueryParsingException[[logstash-2016.05.19] Failed to parse]; nested: JsonParseException[Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: UNKNOWN; line: 3, column: 10]]; }{[asrIxDjBSJeKvDTT7zfgMQ][logstash-2016.05.19][2]: RemoteTransportException[[es5][inet[/10.149.76.155:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[logstash-2016.05.19][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n  \"query\": {\n        { \"match\": { \"serviceName\": \"bsHolds\" } }\n  }\n}\n]]]; nested: QueryParsingException[[logstash-2016.05.19] Failed to parse]; nested: JsonParseException[Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: UNKNOWN; line: 3, column: 10]]; }{[PwDi_CIiQHmOHp34KdWk0A][logstash-2016.05.19][3]: RemoteTransportException[[es3][inet[/10.149.76.97:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[logstash-2016.05.19][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n  \"query\": {\n        { \"match\": { \"serviceName\": \"bsHolds\" } }\n  }\n}\n]]]; nested: QueryParsingException[[logstash-2016.05.19] Failed to parse]; nested: JsonParseException[Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: UNKNOWN; line: 3, column: 10]]; }{[PwDi_CIiQHmOHp34KdWk0A][logstash-2016.05.19][4]: RemoteTransportException[[es3][inet[/10.149.76.97:9300]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[logstash-2016.05.19][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n  \"query\": {\n        { \"match\": { \"serviceName\": \"bsHolds\" } }\n  }\n}\n]]]; nested: QueryParsingException[[logstash-2016.05.19] Failed to parse]; nested: JsonParseException[Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: UNKNOWN; line: 3, column: 10]]; }]",
   "status": 400
}

不知道这意味着什么,但我正在尝试遵循elastic.co上的指南,但在任何查询中我都会不断收到该400错误...

你的花括号太多了。尝试使用此查询

curl -XPOST "http://host/logstash-2016.05.19/_search" -d'{
  "query": {
     "match": { "serviceName": "systemA" }
  }
}'

如果您使用的是Sense,则需要按以下方式进行查询:

POST /logstash-2016.05.19/_search
{
  "query": {
     "match": { "serviceName": "systemA" }
  }
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

我们如何减少 elasticsearch 查询子句的数量?

我们无法为应用程序中的新帐户检索API报告(错误294)

VBScript-我们能否通过代码找出持续时间(以秒为单位)

Ansible-错误!我们无法读取JSON或YAML

便笺错误“我们无法验证您的登录信息”

PayPal API登录错误-“抱歉,我们无法登录。”

由于我们没有记录请求和响应主体,我们如何才能从错误中找出导致请求失败的错误?

无法找出我的验证错误

React Native运行错误:“无法构建iOS项目。我们运行了“ xcodebuild”命令,但它退出,错误代码为65”

我们如何监视mongoDB查询?

我们如何查询Kibana?

我们可以在Elasticsearch中为一个索引使用多种文档类型吗?

好奇为什么我们无法在 onSuccess 中获取查询中的参数?

我们能否将0页错误率设置为无限或荒谬?

参数组的类型为“ dict”,我们无法转换为列表

为什么编译器无法在Haskell中为我们处理新类型?

mvn -version错误:我们无法执行/ usr / libexec / java_home / bin / java

Visual Studio 2017-如何修复错误:我们无法刷新该帐户的凭据

C#中的“我们无法对合并的单元格执行此操作”错误

Office错误:“我们无法注册您的设备并将您的帐户添加到Windows。”

如何解决Windows Update错误消息“我们无法更新系统保留的分区?”

OLE DB或ODBC错误:我们无法将值null转换为逻辑类型

iPad Air-CoreBluetooth [错误]取消选择器,因为我们无法与蓝牙通信

Exchange 2013:EAC,OWA错误:我们现在无法获取该信息

UIApp 为零,这意味着我们无法将控制操作分派到他们的目标

Postgres是否在缓存我们的查询,我们如何解决它?

我们需要编写一个查询来找出部门中的员工人数以及组织中的员工总数

我们如何在迁移学习中为我们的培训设置标签?

我无法找出奇怪的ECONNRESET错误