Skip to content

Commit

Permalink
Merge pull request #11 from denser-org/feature/category_id
Browse files Browse the repository at this point in the history
fix bug,  exprs is empty when category_id = 0
  • Loading branch information
x281737830 authored Jun 18, 2024
2 parents 2e55081 + 9098829 commit 89ee1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion denser_retriever/retriever_milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def retrieve(self, query_text, meta_data, query_id=None):
exprs.append(f"{internal_field} == {unix_time}")
else:
category_id = self.field_cat_to_id[field].get(category_or_date_str)
if category_id:
if category_id is not None:
exprs.append(f"{internal_field}=={category_id}")
expr_str = " and ".join(exprs)
search_params = {
Expand Down

0 comments on commit 89ee1d5

Please sign in to comment.