Method: Stretcher::Index#analyze
- Defined in:
- lib/stretcher/index.rb
#analyze(text, analysis_params) ⇒ Object
Implements the Analyze API EX:
index.analyze("Candles", analyzer: :snowball)
# => #<Hashie::Mash tokens=[#<Hashie::Mash end_offset=7 position=1 start_offset=0 token="candl" type="<ALPHANUM>">]>
162 163 164 165 166 |
# File 'lib/stretcher/index.rb', line 162 def analyze(text, analysis_params) request(:get, "_analyze", analysis_params) do |req| req.body = text end end |