如何在kibana中设置fielddata = true

彼得·默里·锈

我是Kibana的新手,已将数据加载到Elastic 5.0.0-alpha3中,并且正在使用Kibana 5.0.0-alpha3进行可视化。我可以将一些数字字段显示为直方图,但是当我想使用文本字段时,我得到:

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [publisher] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

警告我,数据(发布者的名称)可能已被分析成子字段,但无论如何我还是要显示。

我该如何设定fielddata=true

编辑:有关Kibana github的最新问题表明,这是5.0.0中的一项新功能,仍在等待答案!

编辑(遵循@Val的回答,并向Elastic新手寻求帮助,并希望其他人会发现它很有用)。摄取脚本为:

fs = require('fs')

var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
 host: 'localhost:9200',
 log: 'trace'
});

fs.readFile('/Users/pm286/workspace/cmdev/getpapers/20160602/crossref_results.json', (err, data) => {
  if (err) throw err;
   document = JSON.parse(data)
  document = JSON.parse(data)

  for(i=0;i<document.length;i++) {
      client.create({
          index: 'index',
          type: 'type',
          body: document[i]
          })
      }
  });

如何在其中包含@Val的方法?

在ES映射中,您需要fielddata:truepublisher字段中进行设置

PUT your_index/_mapping/your_type
{
   "your_type": {
      "properties": {
        "publisher": {
          "type": "text",
          "fielddata": true
        }
      }
   }
}

进行此更改后,您需要重新索引数据,但是此后,Kibana不再抱怨。

更新

您可以在Sense UI中执行上述查询,也可以通过curl执行

curl -XPUT http://localhost:9200/index -d '{
  "mappings": {
    "type": {
      "properties": {
        "publisher": {
          "type": "text",
          "fielddata": true
        }
      }
    }
  }
}'

或者,也可以在创建文档之前在Javascript文件中执行它:

client.indices.create({
  index: 'index',
  body: {
      "mappings": {
        "type": {
          "properties": {
            "publisher": {
              "type": "text",
              "fielddata": true
            }
          }
        }
      }
    }
});

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

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

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在 Razor 中设置 Async="True"

来自分类Dev

如何在grails中设置tomcat privileged =“ true”?

来自分类Dev

如何在Android中再次设置布尔值true?

来自分类Dev

如何在couchdb-python中设置group = True

来自分类Dev

如何在jQuery的textarea中设置required true

来自分类Dev

如何在 Websphere 9 中设置连接属性“fixedString=true”

来自分类Dev

':remote => true'如何在Rails中工作

来自分类Dev

':remote => true'如何在Rails中工作

来自分类Dev

如何在角度8中将对象设置为true

来自分类Dev

如何在R胶合语法中设置“ na.rm = TRUE”

来自分类Dev

如何在后台.cs文件中设置ios:Page.UseSafeArea =“ true”

来自分类Dev

如何在Fullcalendar中仅将某些用户的editable设置为true

来自分类Dev

如何在代码中将visible设置为true?

来自分类Dev

如何在Applescript中将“启用UI元素”设置为true?

来自分类Dev

如何在结构文字中将布尔指针设置为true?

来自分类Dev

如何在Jenkinsfile中将Artifactory throwsOldBuilds设置为true?

来自分类Dev

如何在Applescript中将“启用的UI元素”设置为true?

来自分类Dev

如何在Unison GTK中将“胖”选项设置为true?

来自分类Dev

如何在单击元素时将 contenteditable 设置为 true

来自分类Dev

如何在 smali 中将布尔值设置为 true

来自分类Dev

如何在 webssoprofileoption 中将 forceAuthn 设置为 true?

来自分类Dev

if(true || true || false)语句在javascript中是true吗?

来自分类Dev

如何(false == false == true)为true

来自分类Dev

bash中的“ true”的目的是“如果sudo true; then”

来自分类Dev

断言 True 中的奇怪失败是 True

来自分类Dev

Pyqt5:如果文件中的字符串为True,如何在Qlabel中设置Image

来自分类Dev

如何实现IF NOT TRUE

来自分类Dev

在setOnLongClickListner中返回true

来自分类Dev

如何将gpclibPermit()设置为TRUE

Related 相关文章

  1. 1

    如何在 Razor 中设置 Async="True"

  2. 2

    如何在grails中设置tomcat privileged =“ true”?

  3. 3

    如何在Android中再次设置布尔值true?

  4. 4

    如何在couchdb-python中设置group = True

  5. 5

    如何在jQuery的textarea中设置required true

  6. 6

    如何在 Websphere 9 中设置连接属性“fixedString=true”

  7. 7

    ':remote => true'如何在Rails中工作

  8. 8

    ':remote => true'如何在Rails中工作

  9. 9

    如何在角度8中将对象设置为true

  10. 10

    如何在R胶合语法中设置“ na.rm = TRUE”

  11. 11

    如何在后台.cs文件中设置ios:Page.UseSafeArea =“ true”

  12. 12

    如何在Fullcalendar中仅将某些用户的editable设置为true

  13. 13

    如何在代码中将visible设置为true?

  14. 14

    如何在Applescript中将“启用UI元素”设置为true?

  15. 15

    如何在结构文字中将布尔指针设置为true?

  16. 16

    如何在Jenkinsfile中将Artifactory throwsOldBuilds设置为true?

  17. 17

    如何在Applescript中将“启用的UI元素”设置为true?

  18. 18

    如何在Unison GTK中将“胖”选项设置为true?

  19. 19

    如何在单击元素时将 contenteditable 设置为 true

  20. 20

    如何在 smali 中将布尔值设置为 true

  21. 21

    如何在 webssoprofileoption 中将 forceAuthn 设置为 true?

  22. 22

    if(true || true || false)语句在javascript中是true吗?

  23. 23

    如何(false == false == true)为true

  24. 24

    bash中的“ true”的目的是“如果sudo true; then”

  25. 25

    断言 True 中的奇怪失败是 True

  26. 26

    Pyqt5:如果文件中的字符串为True,如何在Qlabel中设置Image

  27. 27

    如何实现IF NOT TRUE

  28. 28

    在setOnLongClickListner中返回true

  29. 29

    如何将gpclibPermit()设置为TRUE

热门标签

归档