无法获得“script_fields”的结果在弹性搜索 [英] Can not get result of "script_fields" in elasticsearch

查看:129
本文介绍了无法获得“script_fields”的结果在弹性搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用script_fields来为我的字段设置新的值,但是我看不到我在结果集上添加的field,{

I am trying to use "script_fields" in order to set new values to my fields but I can not see the "field" that I have added on result set,{

  "query": {
    "my_type_x": xxx
  },
  "script_fields": {
    "test1": {
      "script": "doc['my_type'].value * 3"
    }
  }
}

一旦我在弹性搜索上启动,我没有任何错误,得到结果没有任何问题,但我看不到任何test1与更改的值。

Once I launch this on elasticsearch I get no error and get the results without any problem but I can not see any "test1" with changed value.

我需要在哪里查看?你能告诉我,如果有什么问题吗?

Where do I need to review ? Can you please tell me if anything is wrong ?

谢谢

推荐答案

我的问题来自于Elasticsearch。我刚刚添加,

My problem was coming from the configuration of Elasticsearch. I just added,

script.disable_dynamic: false

,它开始工作。

这篇关于无法获得“script_fields”的结果在弹性搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆