in aliyun/log/index_config.py [0:0]
def to_json(self):
json_value = {}
if self.index_type != "" and self.index_type is not None:
json_value['type'] = self.index_type
if self.index_type == 'text' or self.index_type == 'json':
json_value["token"] = self.token_list
json_value["caseSensitive"] = bool(self.case_sensitive)
if self.alias is not None:
json_value['alias'] = self.alias
json_value["doc_value"] = bool(self.doc_value)
if self.embedding is not None:
json_value["embedding"] = self.embedding
if self.vector_index is not None:
json_value["vector_index"] = self.vector_index
if self.chn is not None:
json_value['chn'] = self.chn
if self.index_type == "json":
self.json_key_config.to_json(json_value)
return json_value