brainsqueeze's picture
Smarter document context retrieval
f86d7f2 verified
raw
history blame contribute delete
444 Bytes
from typing import Tuple, Dict, Optional, Any
from dataclasses import dataclass, field
@dataclass
class ElasticSourceConfig:
index_name: str
text_fields: Tuple[str]
excluded_fields: Optional[Tuple[str]] = field(default_factory=tuple)
@dataclass
class ElasticHitsResult:
"""Dataclass for Elasticsearch hits results
"""
index: str
id: Any
score: float
source: Dict[str, Any]
inner_hits: Dict[str, Any]