code: def update_index(self, project_name, logstore_name, index_detail):
          
  
          headers = {}
          params = {}
          resource = "/logstores/" + logstore_name + "/index"
          headers['Content-Type'] = 'application/json'
          body = six.b(json.dumps(index_detail.to_json()))
          headers['x-log-bodyrawsize'] = str(len(body))
  
          (resp, header) = self._send("PUT", project_name, body, resource, params, headers)
          return UpdateIndexResponse(header, resp)
docs: update index for a logstore
          Unsuccessful opertaion will cause an LogException.
  
          :type project_name: string
          :param project_name: the Project name 
  
          :type logstore_name: string
          :param logstore_name: the logstore name
  
          :type index_detail: IndexConfig
          :param index_detail: the index config detail used to update index
  
          :return: UpdateIndexResponse
          
          :raise: LogException