Combining <https://cwiki.apache.org/confluence/display/solr/Using+Solr+From+Ruby> with https://lucene.apache.org/solr/4_2_0/solr-core/org/apache/solr/handler/FieldAnalysisRequestHandler.html, here’s a Ruby example. I used the *field* analysis request handler as that is perhaps more likely what you want - to use a single analysis on a string value, rather than a whole document at a time. This would be straightforward to morph to use the document analysis request handler if need be:
irb> require 'net/http' irb> h = Net::HTTP.new('localhost', 8983) irb> http_response = h.get('/solr/collection1/analysis/field?wt=ruby&analysis.fieldvalue=Some+Example+Text&analysis.fieldtype=text_general') irb> rsp = eval(http_response.body) irb> rsp['analysis']['field_types']['text_general']['index'][-1].each {|s| puts s['text']} some example text Hope that helps, Erik > On Feb 2, 2015, at 7:54 AM, melb <melaggo...@gmail.com> wrote: > > Hi, > I want to analyse a document and get his tokens and the frequency without > committing it to the index > I found on google the Document Analysis Handler that can do that but I don't > know how to use it > Can someone help me to use it or redirect me to some tutorials > I am using ruby > > > regards, > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/DocumentAnalysisRequestHandler-tp4183449.html > Sent from the Solr - User mailing list archive at Nabble.com.