Search by properties
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import dataclasses
|
||||
from collections.abc import Iterable
|
||||
from typing import Self
|
||||
from typing import Generic, Self, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
NGrams = dict[int, list[str]]
|
||||
|
||||
|
||||
@@ -20,7 +21,7 @@ class SearchMatch:
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class QueryResult:
|
||||
id: int
|
||||
class QueryResult(Generic[T]):
|
||||
result: T
|
||||
distance: float
|
||||
ngram: str
|
||||
|
||||
Reference in New Issue
Block a user