Define custom field type in Solr Cloud Mode [Solr Source]

Viewed 28

I'm working with Solr source code trying to implement my own custom field types for my schema. How can I make this work in Solr cloud? With the original Solr legacy files I know I should just edit Solr's xml config files and do sth like this, but how about cloud, how to add these types there?

<fieldType name="terkim" class="custom.MyCustomField"/>
<field name="tapli" type="terkim"  etc.."/>
1 Answers

the Solr schema does not change when you migrate so Solr Cloud. The biggest difference is where the Solr configuration files are stored.

In Solr standalone, the configuration files (so the schema.xml) are stored in a folder in the machine where the Solr standalone is running. In Solr cloud, all the configuration files are managed by Zookeeper. If you want to update something, you should push the files to ZK [1], and reload the solr collection [2].

[1] https://solr.apache.org/guide/6_6/using-zookeeper-to-manage-configuration-files.html
[2] https://solr.apache.org/guide/6_6/collections-api.html#CollectionsAPI-reload

Related