修复精准搜索文档时文档内容为空导致请求异常的问题

This commit is contained in:
zmister 2022-03-30 11:09:37 +08:00
parent ae68b592f6
commit 92bdf8a7e8

View File

@ -142,7 +142,7 @@ def get_doc_previous(value):
def get_key_context(value,args):
# print(value,args)
# re_result = re.findall(args, value, flags=re.IGNORECASE)
value = value.replace('\n','')
value = value.replace('\n','') if value is not None else ''
p = re.compile(args,flags=re.IGNORECASE)
value_list = []
for m in p.finditer(value):