Searches for the top-k most similar documents in the online document store. Args: distance_metric: distance metric to use for the search. config: The config for the current feature store. table: The feature view whose embeddings should be searche
(
self,
config: RepoConfig,
table: FeatureView,
requested_features: List[str],
query: Optional[List[float]],
top_k: int,
distance_metric: Optional[str] = None,
query_string: Optional[str] = None,
include_feature_view_version_metadata: bool = False,
)
| 462 | |
| 463 | @abstractmethod |
| 464 | def retrieve_online_documents_v2( |
| 465 | self, |
| 466 | config: RepoConfig, |
| 467 | table: FeatureView, |
| 468 | requested_features: List[str], |
| 469 | query: Optional[List[float]], |
| 470 | top_k: int, |
| 471 | distance_metric: Optional[str] = None, |
| 472 | query_string: Optional[str] = None, |
| 473 | include_feature_view_version_metadata: bool = False, |
| 474 | ) -> List[ |
| 475 | Tuple[ |
| 476 | Optional[datetime], |
| 477 | Optional[EntityKeyProto], |
| 478 | Optional[Dict[str, ValueProto]], |
| 479 | ] |
| 480 | ]: |
| 481 | """ |
| 482 | Searches for the top-k most similar documents in the online document store. |
| 483 | |
| 484 | Args: |
| 485 | distance_metric: distance metric to use for the search. |
| 486 | config: The config for the current feature store. |
| 487 | table: The feature view whose embeddings should be searched. |
| 488 | requested_features: the requested document feature names. |
| 489 | query: The query embedding to search for (optional). |
| 490 | top_k: The number of documents to return. |
| 491 | query_string: The query string to search for using keyword search (bm25) (optional) |
| 492 | |
| 493 | Returns: |
| 494 | A list of dictionaries, where each dictionary contains the datetime, entitykey, and a dictionary |
| 495 | of feature key value pairs |
| 496 | """ |
| 497 | pass |
| 498 | |
| 499 | @abstractmethod |
| 500 | def validate_data_source( |
no outgoing calls
no test coverage detected