Custom version number for Solr schema - Stack Overflow
The SystemInfoHandler will provide the version along with other information about the Solr instance. In later versions of Solr (3.x & 4.x), this is already enabled as part of the admin requestHandler.
You can access the information via http://localhost:8983/solr/admin/system
from the example site distributed with Solr. Modify the url accordingly for your Solr configuration.
Note: If you are running an older version of Solr this can be enabled by adding the following line to the solrconfig.xml file.
<requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
Update: For the specific scenario of knowing when the schema has changed (e.g. version the schema) can be accomplished by updating the name attribute of root node every time the schema file is modified. This name value will then be available in the SystemInfoHandler response.
Read full article from Custom version number for Solr schema - Stack Overflow
No comments:
Post a Comment