forked from innovacion/searchbox
Add engine abstraction
This commit is contained in:
@@ -6,4 +6,22 @@ from pydantic import BaseModel
|
||||
class SearchRow(BaseModel):
|
||||
chunk_id: str
|
||||
score: float
|
||||
payload: dict[str, Any]
|
||||
payload: dict[str, Any] # type: ignore[reportExplicitAny]
|
||||
|
||||
|
||||
class Condition(BaseModel): ...
|
||||
|
||||
|
||||
class Match(Condition):
|
||||
key: str
|
||||
value: str
|
||||
|
||||
|
||||
class MatchAny(Condition):
|
||||
key: str
|
||||
any: list[str]
|
||||
|
||||
|
||||
class MatchExclude(Condition):
|
||||
key: str
|
||||
exclude: list[str]
|
||||
|
||||
Reference in New Issue
Block a user