Fix: handle id as keyword (#14729)

### What problem does this PR solve?

Update mapping.json to treat id as a keyword.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2026-05-09 17:41:08 +08:00
committed by GitHub
parent 8ac14b597f
commit efe6d23d61
3 changed files with 3 additions and 3 deletions

View File

@@ -209,7 +209,7 @@ class ESConnection(ESConnectionBase):
elif field == "id":
continue # id as "text", not a "keyword", order by it will cause error
else:
order_info = {"order": order, "unmapped_type": "text"}
order_info = {"order": order, "unmapped_type": "keyword"}
orders.append({field: order_info})
s = s.sort(*orders)