Skip to content

Commit 60fdc5e

Browse files
committed
Allow 0 as score threshold and result threshold
1 parent 6378ca6 commit 60fdc5e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

videodb/search.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ def search_inside_video(
134134
"index_type": index_type,
135135
"query": query,
136136
"score_threshold": score_threshold
137-
or SemanticSearchDefaultValues.score_threshold,
137+
if score_threshold is not None
138+
else SemanticSearchDefaultValues.score_threshold,
138139
"result_threshold": result_threshold
139-
or SemanticSearchDefaultValues.result_threshold,
140+
if result_threshold is not None
141+
else SemanticSearchDefaultValues.result_threshold,
140142
"dynamic_score_percentage": dynamic_score_percentage,
141143
"rerank": rerank,
142144
"rerank_params": rerank_params,
@@ -165,9 +167,11 @@ def search_inside_collection(
165167
"index_type": index_type,
166168
"query": query,
167169
"score_threshold": score_threshold
168-
or SemanticSearchDefaultValues.score_threshold,
170+
if score_threshold is not None
171+
else SemanticSearchDefaultValues.score_threshold,
169172
"result_threshold": result_threshold
170-
or SemanticSearchDefaultValues.result_threshold,
173+
if result_threshold is not None
174+
else SemanticSearchDefaultValues.result_threshold,
171175
"dynamic_score_percentage": dynamic_score_percentage,
172176
"rerank": rerank,
173177
"rerank_params": rerank_params,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy