how to set fielddata=true in kibana
<p>I am new to Kibana, have data loaded into Elastic 5.0.0-alpha3 and am using Kibana 5.0.0-alpha3 to Visualise. I can display some numeric fields as histograms but when I want to use text fields I get:</p>

<pre><code>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.
</code></pre>

<p>I am warned that the data (names of Publishers) may have been analyzed into subfields, but I'd like to display anyway.</p>

<p>How do I set <code>fielddata=true</code>?</p>

<p>EDIT: recent issues on Kibana github suggest that this is a new feature in 5.0.0 and is still awaiting an answer!</p>

<p>EDIT (following @Val's answer, and asking for Elastic newbie help, and hoping others will find it useful). The ingest script was:</p>

<pre><code>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) =&gt; {
  if (err) throw err;
   document = JSON.parse(data)
  document = JSON.parse(data)

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

<p>How do I include @Val's approach in this?</p>