code: def update_search_index(self, index_name, search_func, analyzer=None):
          
          search = self.get_index(index_name)
          if search is None:
              raise CloudantArgumentError(112, index_name)
          if analyzer is not None:
              search = {'index': codify(search_func), 'analyzer': analyzer}
          else:
              search = {'index': codify(search_func)}
  
          self.indexes.__setitem__(index_name, search)
docs: Modifies/overwrites an existing Cloudant search index in the
          locally cached DesignDocument indexes dictionary.
  
          :param str index_name: Name used to identify the search index.
          :param str search_func: Javascript search index function.
          :param analyzer: Optional analyzer for this search index.