Reloading a Solr core
Reload a Solr core instead of creating a new one when you modify the schema.xml or solrconfig.xml.
$ curl "http://localhost:8983/solr/admin/cores?action=RELOAD&name=keyspace.table"
You can use options with the RELOAD command to re-index and keep, or delete, the Lucene index. When you do not specify an option, the default is used.
When you make a change to the schema, the compatibility of the existing index and the new schema is questionable. If the change to the schema made changes to a field's type, the index and schema will certainly be incompatible. Changes to a field's type can actually occur in subtle ways, occasionally without a change to the schema.xml file itself. For example, a change to other configuration files, such as synonyms, can change the schema. If such an incompatibility exists, a full re-index, which includes deleting all the old data, of the Solr data is required. In these cases, anything less than a full re-index renders the schema changes ineffective. Typically, a change to the Solr schema requires a full re-indexing.
- distributed
True, the default, distributes an index to nodes in the cluster. False re-indexes the Solr data on one node. The false setting is used in certain recovery and upgrade procedures.
$ curl -v "http://localhost:8983/solr/admin/cores?action=RELOAD& name=keyspace.table&distributed=false"
- reindex and deleteAll
Re-indexes data in place or re-indexes in full. The default for both options is false. Accepting the defaults reloads the core and no re-indexing occurs.
Re-indexing in place
reindex=true
and deleteAll=false
re-indexes data
and keeps the existing lucene index. During the uploading process, user searches yield
inaccurate results. To perform an in-place re-index, use this
syntax:curl "http://localhost:8983/solr/admin/cores?action=RELOAD &name=keyspace.table&reindex=true&deleteAll=false"
Re-indexing in full
Setting reindex=true
and deleteAll=true
deletes the Lucene
index and re-indexes the dataset. User searches initially return no documents as the Solr
cores reload and data is re-indexed.
Setting reindex=false
and deleteAll=true
does nothing and
generates an exception.