[
https://issues.apache.org/jira/browse/SOLR-5098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Potter updated SOLR-5098:
---------------------------------
Attachment: SOLR-5098.patch
Here is a first cut at support for adding new field types to managed schema.
Two things of interest here:
1) There's a whole bunch of proven code for creating a fieldType using the
FieldTypePluginLoader so I chose to use that for this solution. However, it
requires the fieldType to be defined in XML, hence this patch uses an "adapter"
to transform the JSON from the REST API request to XML, see:
FieldTypeXmlAdapter (only around 100 lines of shim code)
2) The endpoint doesn't support adding multiple field types in a single request
as is allowed for fields. Personally, I think client apps should have to add
one field type at a time, but if we want to allow multiple that shouldn't be
too bad to add.
> Add REST support for adding field types to the schema
> -----------------------------------------------------
>
> Key: SOLR-5098
> URL: https://issues.apache.org/jira/browse/SOLR-5098
> Project: Solr
> Issue Type: Sub-task
> Components: Schema and Analysis
> Reporter: Steve Rowe
> Assignee: Timothy Potter
> Priority: Minor
> Attachments: SOLR-5098.patch
>
>
> POST to {{/schema/fieldtypes}} will add one or more new field types to the
> schema.
> PUT to {{/schema/fieldtypes/_name_}} will add the {{_name_}}'d field type to
> the schema.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]