Skip to content

Commit

Permalink
Rename search size to limit
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Mar 18, 2024
1 parent 57b3b8c commit 5e346f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion radis/search/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SearchFilters:
class Search(NamedTuple):
query: str
offset: int = 0
size: int = 10
limit: int = 10
filters: SearchFilters = SearchFilters()


Expand Down
8 changes: 4 additions & 4 deletions radis/vespa/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def search_bm25(search: Search) -> SearchResult:
"yql": yql,
"query": search.query,
"type": "web",
"hits": search.size,
"hits": search.limit,
"offset": search.offset,
"queryProfile": SEARCH_QUERY_PROFILE,
"ranking": BM25_RANK_PROFILE,
Expand All @@ -68,7 +68,7 @@ def search_semantic(search: Search) -> SearchResult:
"yql": yql,
"query": search.query,
"type": "web",
"hits": search.size,
"hits": search.limit,
"offset": search.offset,
"queryProfile": SEARCH_QUERY_PROFILE,
"ranking": SEMANTIC_RANK_PROFILE,
Expand All @@ -95,7 +95,7 @@ def search_hybrid(search: Search) -> SearchResult:
"yql": yql,
"query": search.query,
"type": "web",
"hits": search.size,
"hits": search.limit,
"offset": search.offset,
"queryProfile": SEARCH_QUERY_PROFILE,
"ranking": FUSION_RANK_PROFILE,
Expand All @@ -121,7 +121,7 @@ def retrieve_bm25(search: Search) -> RetrievalResult:
"yql": yql,
"query": search.query,
"type": "web",
"hits": search.size,
"hits": search.limit,
"offset": search.offset,
"queryProfile": RETRIEVAL_QUERY_PROFILE,
"ranking": "unranked",
Expand Down

0 comments on commit 5e346f6

Please sign in to comment.