elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb
def analyze(arguments = {})
          headers = arguments.delete(:headers) || {}

          body = arguments.delete(:body)

          arguments = arguments.clone

          _index = arguments.delete(:index)

          method = if body
                     Elasticsearch::API::HTTP_POST
                   else
                     Elasticsearch::API::HTTP_GET
                   end

          path   = if _index
                     "#{Utils.__listify(_index)}/_analyze"
                   else
                     "_analyze"
                   end
          params = Utils.process_params(arguments)

          perform_request(method, path, params, body, headers).body
        end
# Performs the analysis process on a text and return the tokens breakdown of the text.
#
# @option arguments [String] :index The name of the index to scope the operation
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body Define analyzer/tokenizer parameters and the text on which the analysis should be performed
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
#
Performs the analysis process on a text and return the tokens breakdown of the text.
Performs the analysis process on a text and return the tokens breakdown of the text .
def analyze(arguments = {})
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          _index = arguments.delete(:index)
          method = if body
                     Elasticsearch::API::HTTP_POST
                   else
                     Elasticsearch::API::HTTP_GET
                   end
          path   = if _index
                     "#{Utils.__listify(_index)}/_analyze"
                   else
                     "_analyze"
                   end
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def analyze ( arguments = { } ) headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _index = arguments . delete ( :index ) method = if body Elasticsearch :: API :: HTTP_POST else Elasticsearch :: API :: HTTP_GET end path = if _index "#{Utils.__listify(_index)}/_analyze" else "_analyze" end params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Performs the analysis process on a text and return the tokens breakdown of the text.
Performs the analysis process on a text and return the tokens breakdown of the text .
arguments
:body Define analyzer/tokenizer parameters and the text on which the analysis should be performed
: body Define analyzer / tokenizer parameters and the text on which the analysis should be performed
see
None