Visitar URL original
feat: Added global search api and necessary unit tests by aniketpalu · Pull Request #5532 · feast-dev/feast · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor reformatting & fixed lint error
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
  • Loading branch information
aniketpalu committed Aug 11, 2025
commit c5a67910718b38b96cb0979dccdd6c056ab80f76
4 changes: 2 additions & 2 deletions sdk/python/feast/api/registry/rest/rest_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ def filter_search_results_and_match_score(

def fuzzy_match(
query: str, text: str, threshold: float = MATCH_SCORE_DEFAULT_THRESHOLD
) -> bool:
) -> float:
"""Simple fuzzy matching using character overlap"""
if not query or not text:
return False
return 0.0

query_chars = set(query)
text_chars = set(text)
Expand Down
7 changes: 5 additions & 2 deletions sdk/python/tests/unit/api/test_search_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,10 @@ def test_search_by_domain_tags_across_projects(self, multi_project_search_test_a

# Should only find resources from project_a (transportation domain)
project_a_results = [
r for r in data["results"] if r.get("project") == "project_a" and r.get("match_score") == tag_match_score
r
for r in data["results"]
if r.get("project") == "project_a"
and r.get("match_score") == tag_match_score
]

assert len(project_a_results) > 0
Expand Down Expand Up @@ -1980,6 +1983,6 @@ def test_search_pagination_limit_above_maximum(self, search_test_app):
"""Test pagination limit above maximum allowed value (100) returns error"""
response = search_test_app.get("/search?query=user&limit=150")
assert response.status_code == 400

error_data = response.json()
assert "detail" in error_data