Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The expr condition filtering in hybrid_search is not working correctly. #2572

Open
1 task done
lxmz opened this issue Jan 16, 2025 · 0 comments
Open
1 task done
Assignees
Labels
kind/bug Something isn't working

Comments

@lxmz
Copy link

lxmz commented Jan 16, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

when I use
milvus_records = AnnSearchRequest(data=embs, anns_field="embedding",
param=self.search_params, limit=top_k, expr=expr)
sparse_milvus_records = AnnSearchRequest(data=sparse, anns_field="sparse_vector",
param=self.search_params, limit=top_k, expr=expr)
res = self.sess.hybrid_search([milvus_records, sparse_milvus_records], partition_names=self.kb_ids,
rerank=WeightedRanker(0.8, 0.5),
limit=top_k, output_fields=self.output_material_id,
timeout=client_timeout)
expr: own_province in ['800'] and first_industry_label in ['教育']
but I get 住建:

Image

when I use :
sess.search(data=embs, partition_names=self.kb_ids, anns_field="embedding",
param=self.search_params, limit=top_k,
output_fields=self.output_material_id, expr=expr, timeout=client_timeout)
results is True

Expected Behavior

住建 is not in results

Steps/Code To Reproduce behavior

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0): 2.4.14
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

@lxmz lxmz added the kind/bug Something isn't working label Jan 16, 2025
@XuanYang-cn XuanYang-cn self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants