简体   繁体   中英

Updating schema for a IBM Watson Retrieve and Rank Config

Are there ways to update the schema of the Solr config in IBM Watson's Retrieve and Rank service other than deleting, then uploading the config again.

I used the following example to create a new cluster, config and collection. https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/retrieve-rank/get_start.shtml

I started from the blank example config and updated the schema.

I now need to update the schema and add/modify some schema elements. Is there a way to do it without deleting and uploading the config again? How can this be done so that there is minimum downtime when making the change?

You can do this but you have to configure Solr to use managed schemas: https://cwiki.apache.org/confluence/display/solr/Managed+Schema+Definition+in+SolrConfig and then the schema APIs: https://cwiki.apache.org/confluence/display/solr/Schema+API .

Do note, however, the big caveat on the schema API page:

Re-index after schema modifications! If you modify your schema, you will likely need to re-index all documents. If you do not, you may lose access to documents, or not be able to interpret them properly, eg after replacing a field type. Modifying your schema will never modify any documents that are already indexed. Again, you must re-index documents in order to apply schema changes to them.

So it will depend on what specific schema changes you need as to whether or not you need to re-index.. If you're adding a new field, no problems... if you're modifying an existing field, this will only impact data you have not indexed yet and it might mean you should re-index (depending on your changes), etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM