There is an existing Solr admin service to do that, which is what the Solr Admin UI uses to support that feature:

For example:

curl http://localhost:8983/solr/analysis/field?analysis.fieldname=features&analysis.fieldvalue=Hello+World.&indent=true”

There are some examples in the next (unpublished) release of my book (that's one of them.)

That handler returns all token details, but if you wanted to roll your own, start there. The handler is:
org.apache.solr.handler.FieldAnalysisRequestHandler

-- Jack Krupansky

-----Original Message----- From: Software Dev
Sent: Wednesday, February 26, 2014 7:00 PM
To: solr-user@lucene.apache.org
Subject: How does Solr parse schema.xml?

Can anyone point me in the right direction. I'm trying to duplicate the
functionality of the analysis request handler so we can wrap a service
around it to return the terms given a string of text. We would like to read
the same schema.xml file to configure the analyzer,tokenizer, etc but I
can't seem to find the class that actually does the parsing of that file.

Thanks

Reply via email to