from pydantic import BaseModel class MnTerm(BaseModel): id: str main_type : str "sub_type": str "title": str "content": str "author": str { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "begin_date": { "type": "date" }, "end_date": { "type": "date" }, "begin_year": { "type": "integer" }, "tags": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "keywords": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } }