我是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的方法?