feat:更新elastic模块
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from typing import Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -9,12 +9,14 @@ class BlogElastic(BaseModel):
|
||||
title: str
|
||||
content: str
|
||||
category: str
|
||||
createTime: Optional[Union[datetime, str]] = None
|
||||
updateTime: Optional[Union[datetime, str]] = None
|
||||
|
||||
|
||||
BLOG_MAPPING = {
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"id": {"type": "long"},
|
||||
"title": {
|
||||
"type": "text",
|
||||
"analyzer": "ik_max_word",
|
||||
|
||||
Reference in New Issue
Block a user