Search by properties

This commit is contained in:
marc
2025-05-04 22:10:10 +02:00
parent 4911935cdf
commit 47d18400c3
13 changed files with 245 additions and 68 deletions

View File

@@ -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