Skip to content

Instantly share code, notes, and snippets.

@hidepin
Last active January 11, 2020 02:40
Show Gist options
  • Save hidepin/2c72f9bb09673f2d7999c2538e373027 to your computer and use it in GitHub Desktop.
Save hidepin/2c72f9bb09673f2d7999c2538e373027 to your computer and use it in GitHub Desktop.
kibana scripted fields
if (doc['hulft.log.reply.raw'].value != null) {
  def result = doc['hulft.log.reply.raw'].value;
  int lastIndex = result.lastIndexOf("処理結果:");
  if (lastIndex > 0) {
    return Integer.parseInt(result.substring(lastIndex+5));
  }
}

return -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment