fix too long query exception (#1195)

### What problem does this PR solve?

#1161 
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh
2024-06-18 09:50:59 +08:00
committed by GitHub
parent 7920a5c78d
commit e35f7610e7
4 changed files with 19 additions and 14 deletions

View File

@ -110,6 +110,7 @@ class EsQueryer:
sm = []
keywords.append(re.sub(r"[ \\\"']+", "", tk))
if len(keywords) >= 12: break
tk_syns = self.syn.lookup(tk)
tk = EsQueryer.subSpecialChar(tk)

View File

@ -98,7 +98,7 @@ class Dealer:
if not qst:
if not req.get("sort"):
s = s.sort(
{"create_time": {"order": "desc", "unmapped_type": "date"}},
#{"create_time": {"order": "desc", "unmapped_type": "date"}},
{"create_timestamp_flt": {
"order": "desc", "unmapped_type": "float"}}
)
@ -108,7 +108,7 @@ class Dealer:
"mode": "avg", "numeric_type": "double"}},
{"top_int": {"order": "asc", "unmapped_type": "float",
"mode": "avg", "numeric_type": "double"}},
{"create_time": {"order": "desc", "unmapped_type": "date"}},
#{"create_time": {"order": "desc", "unmapped_type": "date"}},
{"create_timestamp_flt": {
"order": "desc", "unmapped_type": "float"}}
)