Skip to content

Commit d2e0a59

Browse files
committed
feat: add document store
1 parent 2cd73d1 commit d2e0a59

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

sdk/python/feast/infra/online_stores/contrib/postgres.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,7 @@ def online_search(
340340

341341
return result
342342

343-
def create_index(
344-
self,
345-
config: RepoConfig,
346-
table: str
347-
):
343+
def create_index(self, config: RepoConfig, table: str):
348344
document_store_config = config.document_store_config
349345
with self._get_conn(config) as conn, conn.cursor() as cur:
350346
cur.execute(

sdk/python/feast/infra/online_stores/document_store.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import numpy as np
66

77
from feast.feature_view import FeatureView
8+
from feast.infra.online_stores.online_store import OnlineStore
89
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
910
from feast.repo_config import FeastConfigBaseModel, RepoConfig
10-
from feast.infra.online_stores.online_store import OnlineStore
1111

1212

1313
class DocumentStoreIndexConfig(FeastConfigBaseModel):
@@ -16,14 +16,13 @@ class DocumentStoreIndexConfig(FeastConfigBaseModel):
1616

1717

1818
class DocumentStore(OnlineStore):
19-
2019
@abstractmethod
2120
def online_search(
22-
self,
23-
config: RepoConfig,
24-
table: FeatureView,
25-
requested_feature: str,
26-
embeddings: np.ndarray,
27-
top_k: int,
21+
self,
22+
config: RepoConfig,
23+
table: FeatureView,
24+
requested_feature: str,
25+
embeddings: np.ndarray,
26+
top_k: int,
2827
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
29-
raise NotImplementedError("You have to implement this!")
28+
raise NotImplementedError("You have to implement this!")

0 commit comments

Comments
 (0)