Skip to content

Commit d6d77dc

Browse files
kkirschekarmi
authored andcommitted
[API] Improve the example for the "Indices Analyze" API
Correct and extend documentation on indices.analyze API. Equivalent to pull request #109 by @s01ipsist. Closes #135
1 parent 8730777 commit d6d77dc

File tree

1 file changed

+4
-2
lines changed
  • elasticsearch-api/lib/elasticsearch/api/actions/indices

1 file changed

+4
-2
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ module Actions
1515
#
1616
# @example Analyze text "Quick Brown Jumping Fox" with a custom tokenizer and filter chain
1717
#
18-
# client.indices.analyze text: 'The Quick Brown Jumping Fox',
18+
# client.indices.analyze body: 'The Quick Brown Jumping Fox',
1919
# tokenizer: 'whitespace',
2020
# filters: ['lowercase','stop']
2121
#
22+
# @note If your text for analysis is longer than 4096 bytes then you should use the :body argument, rather than :text, to avoid HTTP transport errors
23+
#
2224
# @option arguments [String] :index The name of the index to scope the operation
23-
# @option arguments [Hash] :body The text on which the analysis should be performed
25+
# @option arguments [String] :body The text on which the analysis should be performed
2426
# @option arguments [String] :analyzer The name of the analyzer to use
2527
# @option arguments [String] :field Use the analyzer configured for this field
2628
# (instead of passing the analyzer name)

0 commit comments

Comments
 (0)