Upgrading from Order Service beta release

The Beta release of IBM® Sterling™ Order Management System Software Order Service cannot store more than 32 KB data of the order summary data in the order index in Elasticsearch. Though this size is sufficient for regular orders, it is not enough for larger orders in IBM Sterling Order Management System Software. This limitation is addressed in the Order Service general availability (GA) release by setting an appropriate Elasticsearch data type for the _summary field in the order index.

About this task

Upgrading you existing index to accommodate this change is not possible, as Elasticsearch does not allow a change in the data type after documents are added to the index. Therefore, you must delete the current index. Then, create the index again by using the Order Service APIs, and then run the Sterling Order Management System Software agents to save data again.

However, as no API is provided to delete an index in Order Service, you need to perform these actions directly on your Elasticsearch and Cassandra instances. To rectify the data type on your index, refer to the following instructions.

Procedure

  1. Delete the index and the index template on Elasticsearch. To do so, run the following command. Also, replace the <IP> with your Elasticsearch server IP.
    curl -XDELETE "http://<IP>:9200/order*"
    curl -XDELETE "http://<IP>:9200/_template/order*"
    
    Note: If you already migrated history orders to Order Service, then do not use the wild character in the first command. Instead, give the indexes to delete, separated by comma, and exclude the indexes where the history orders are migrated to.
  2. Delete the Elasticsearch index configuration cached in Order Service. The index configuration is also stored in the oss_index_config table in Cassandra. Therefore, you must delete this data, as well. To do so, go to your Cassandra server and run the following command. Also, replace <keyspace> with the Cassandra keyspace that you use for Order Service.
    cqlsh -k <keyspace> -e "truncate <keyspace>.oss_index_config"
  3. Create an index by using the createSearchIndex API. If required, you can clone index.
  4. Save order data to Order Service by running both the Mass Sync agents from Sterling Order Management System Software.