Module: Elasticsearch::Extensions::ANSI

Defined in:
lib/elasticsearch/extensions/ansi.rb,
lib/elasticsearch/extensions/ansi/actions.rb,
lib/elasticsearch/extensions/ansi/helpers.rb,
lib/elasticsearch/extensions/ansi/response.rb

Overview

This extension provides a ResponseBody#to_ansi method for the Elasticsearch response body, which colorizes and formats the output with the ‘ansi` gem.

Examples:

Display formatted search results


require 'elasticsearch/extensions/ansi'
puts Elasticsearch::Client.new.search.to_ansi

Display a table with the output of the ‘_analyze` API


require 'elasticsearch/extensions/ansi'
puts Elasticsearch::Client.new.indices.analyze(text: 'Quick Brown Fox Jumped').to_ansi

Defined Under Namespace

Modules: Actions, Helpers Classes: ResponseBody