Fixed escaping of \u in Elasticsearch Query String queries

This commit is contained in:
Thomas Patzke 2018-05-01 00:05:16 +02:00
parent 15a6c5efb5
commit e411039b56
2 changed files with 1 additions and 2 deletions

View File

@ -86,7 +86,6 @@ async def check_queries():
try:
detail_result = await esa.search(index=index, q=query)
except Exception as e:
#error = e.info['error']['root_cause']
error = e.info
failed.append((rule, query, error))

View File

@ -304,7 +304,7 @@ class ElasticsearchQuerystringBackend(SingleTextQueryBackend):
identifier = "es-qs"
active = True
reEscape = re.compile("([+\\-=!(){}\\[\\]^\"~:/]|\\\\(!>[*?])|&&|\\|\\|)")
reEscape = re.compile("([+\\-=!(){}\\[\\]^\"~:/]|\\\\(!>[*?])|\\\\u|&&|\\|\\|)")
reClear = re.compile("[<>]")
andToken = " AND "
orToken = " OR "