Skip to content

Commit

Permalink
MINOR: make type optional in ES Response (#17832)
Browse files Browse the repository at this point in the history
* MINOR: make type optional in ES Mixin

* make none as default

* pyformat
  • Loading branch information
ulixius9 authored and pmbrull committed Sep 13, 2024
1 parent 7efdd9b commit 05cb36f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ingestion/src/metadata/ingestion/ometa/mixins/es_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class HitsModel(BaseModel):
"""Elasticsearch hits model"""

index: Annotated[str, Field(description="Index name", alias="_index")]
type: Annotated[str, Field(description="Type of the document", alias="_type")]
type: Annotated[
Optional[str],
Field(default=None, description="Type of the document", alias="_type"),
]
id: Annotated[str, Field(description="Document ID", alias="_id")]
score: Annotated[
Optional[float], Field(description="Score of the document", alias="_score")
Expand Down

0 comments on commit 05cb36f

Please sign in to comment.