You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Software Dev <st...@gmail.com> on 2014/02/27 01:00:49 UTC

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

Re: How does Solr parse schema.xml?

Posted by Steve Rowe <sa...@gmail.com>.
Check out org.apache.solr.schema.IndexSchema#readSchema(), which uses org.apache.solr.schema.FieldTypePluginLoader to parse analyzers.
 
On Feb 26, 2014, at 7:00 PM, Software Dev <st...@gmail.com> wrote:

> 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


Re: How does Solr parse schema.xml?

Posted by Jack Krupansky <ja...@basetechnology.com>.
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