title: How do I handle fields in elasticsearch that contain a '_'?
body: <p>I am using a <a href="https://github.com/yougov/mongo-connector" rel="nofollow noreferrer">Mongo-Connector</a> targeting <a href="https://github.com/yougov/elastic2-doc-manager" rel="nofollow noreferrer">elasticsearch</a>. This works great for keeping elasticsearch up to date, but I have a problem with one of the fields because it contains an '_'. The data is being replicated/streamed from mongodb continually if I run a rename/reindex the new documents will start showing up with underscores again.</p>
  
  <p>Kibana does not support underscores at the start of a field. What is the best practice for handling this? </p>
  
  <p>I have filed an <a href="https://github.com/yougov/elastic2-doc-manager/issues/63" rel="nofollow noreferrer">issue</a> with <a href="https://github.com/yougov/mongo-connector" rel="nofollow noreferrer">elastic2-doc-manager</a> for <a href="https://github.com/yougov/elastic2-doc-manager" rel="nofollow noreferrer">Mongo-Connector</a> to support ingest nodes, but this feels like a much bigger issue with kibana all my attempts at fixing this issue using scripted fields and renaming the field have failed.</p>
  
  <p>This seems like a huge problem. I see underscores in data everywhere, seems like a very poor decision on the side of the kibana team.</p>
  
  <p><strong>Kibana Error:</strong>
  <a href="https://i.stack.imgur.com/KfYpi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KfYpi.png" alt="enter image description here"></a></p>
  
  <p>I have found some github referencese to this issue, but no work arounds.</p>
  
  <ul>
  <li>Closed Issue: <a href="https://github.com/elastic/kibana/issues/2551" rel="nofollow noreferrer">fields starting with underscore ( _ ) doesn't show</a></li>
  <li>Never merged Pull request: <a href="https://github.com/elastic/kibana/pull/4291" rel="nofollow noreferrer">Lift restriction of not allowing
  '_'-prefixed fields.</a> </li>
  <li>Open Issue: <a href="https://github.com/elastic/kibana/issues/14856" rel="nofollow noreferrer">Allow fields prefixed with _
  (originally #4291)</a></li>
  </ul>