[ 
https://issues.apache.org/jira/browse/SOLR-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614918#comment-13614918
 ] 

Steve Rowe commented on SOLR-4623:
----------------------------------

bq. we should review the other uses of the same code-dup'ed function in 
IndexSchema and ensure there are not similar bugs

The code-dup'ed function is in FieldType, not IndexSchema, and right now it's 
used to convert fully qualified class names of analyzers, and analysis 
components, to short name "solr.<SimpleClassName>".

Looking at SolrResourceLoader.findClass(), where analysis component references 
of the form "solr.<SimpleClassName>" are converted to Class references, I see 
that this is inappropriate for analyzer classes, since Lucene SPI doesn't cover 
them.  I'll stop shortening analyzer classnames.

I looked up the currently defined analysis factories in trunk, and all of them 
are under org.apache.lucene.analysis.\*\* and org.apache.solr.analysis.\*\*.  
Lucene analysis component factories are loaded via SPI, and Solr analysis 
factories are discovered by iteratively attempting Class.forName() using a 
fixed set of package prefixes, including "org.apache.solr.analysis.".

I'll change the acceptable prefixes to "org.apache.lucene.analysis." and 
"org.apache.solr.analysis.".  

Since SPI isn't used for Solr factories, I'll change the method name from 
normalizeSPIname() to getShortName(), since "shortname"/"short name" seems to 
be what "solr.<SimpleClassName>" instances are called.  I would change 
SimilarityFactory.normalizeName() to getShortName() too, but I see it's only 
called the one time, so I'll inline it and get rid of the method. 

Patch coming shortly.

                
> Add REST API methods to get all remaining schema information, and also to 
> return the full live schema in json, xml, and schema.xml formats
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4623
>                 URL: https://issues.apache.org/jira/browse/SOLR-4623
>             Project: Solr
>          Issue Type: Sub-task
>          Components: Schema and Analysis
>    Affects Versions: 4.2
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Minor
>             Fix For: 4.3
>
>         Attachments: JSONResponseWriter.output.json, 
> SchemaXmlResponseWriter.output.xml, SOLR-4623.patch, 
> XMLResponseWriter.output.xml
>
>
> Each remaining schema component (after field types, fields, dynamic fields, 
> copy fields were added by SOLR-4503) should be available from the schema REST 
> API: name, version, default query operator, similarity, default search field, 
> and unique key.
> It should be possible to get the entire live schema back with a single 
> request, and schema.xml format should be one of the supported response 
> formats.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to