На самом деле для этого у вас есть API схемы.
API схемы Solr позволяет использовать API REST для получения информации о schema.xml
В Solr 4.2 и 4.3 он разрешает только GET (только для чтения) доступ, но в
В Solr 4.4 новые схемы и директивы copyField могут быть добавлены в схему. Будущие выпуски Solr расширят эту функциональность, чтобы позволить больше схемы
элементы для обновления
Точки входа API
/collection/schema: retrieve the entire schema
/collection/schema/fields: retrieve information about all defined fields, or create new fields with optional copyField directives
/collection/schema/fields/name: retrieve information about a named field, or create a new named field with optional copyField directives
/collection/schema/dynamicfields: retrieve information about dynamic field rules
/collection/schema/dynamicfields/name: retrieve information about a named dynamic rule
/collection/schema/fieldtypes: retrieve information about field types
/collection/schema/fieldtypes/name: retrieve information about a named field type
/collection/schema/copyfields: retrieve information about copy fields, or create new copyField directives
/collection/schema/name: retrieve the schema name
/collection/schema/version: retrieve the schema version
/collection/schema/uniquekey: retrieve the defined uniqueKey
/collection/schema/similarity: retrieve the global similarity definition
/collection/schema/solrqueryparser/defaultoperator: retrieve the default operator
Примеры
Input
Получить список всех полей.
curl http://localhost:8983/solr/collection1/schema/fields?wt=json
Input
Получить всю схему в формате JSON.
curl http://localhost:8983/solr/collection1/schema?wt=json
Подробнее здесь: apache-solr-ref-guide-4.5.pdf (поиск по API схемы)