Skip to content

Commit 76590bf

Browse files
authored
feat: Add 'featureView' in global search api result for features. (#5626)
* Added featureView in the response for search results of features Signed-off-by: Aniket Paluskar <[email protected]> * Added tests to check featureView addition in feature search results Signed-off-by: Aniket Paluskar <[email protected]> --------- Signed-off-by: Aniket Paluskar <[email protected]>
1 parent 5ab18a6 commit 76590bf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sdk/python/feast/api/registry/rest/search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def search_resources(
167167
"name": feature.get("name", ""),
168168
"description": feature.get("description", ""),
169169
"project": current_project,
170+
"featureView": feature.get("featureView", ""),
170171
"tags": feature.get("tags", {}),
171172
}
172173
)

sdk/python/tests/unit/api/test_search_api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,15 @@ def test_search_query_functionality(self, shared_search_responses):
802802
"Expected individual features to appear in search results, but found none"
803803
)
804804

805+
for feature_result in feature_results:
806+
assert "featureView" in feature_result
807+
assert feature_result["featureView"] in [
808+
"user_features",
809+
"product_features",
810+
"transaction_features",
811+
"user_on_demand_features",
812+
]
813+
805814
# Verify we have features that likely come from different feature views
806815
feature_names = {f["name"] for f in feature_results}
807816

0 commit comments

Comments
 (0)