fix: Count exception occurs when searching conversations
Checklist:
[!IMPORTANT]
Please review the checklist below before submitting your pull request.
- [x] Please open an issue before creating a PR or link to an existing issue
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
Description
When using keyword to query conversations, multiple messages with unique conversation.id will be queried, resulting in an incorrect number of final query results (less than limit: 10)
Fix: #7964
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update, included: Dify Document
- [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
- [ ] Dependency upgrade
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
@laipz8200 hey, could u review it ?
I can confirm that this is a bug. However, adding a group by clause might lead to performance issues, so we need to run some tests.
I can confirm that this is a bug. However, adding a group by clause might lead to performance issues, so we need to run some tests.
ok, if it has performance issues plz let me know the results
@Gaocarri Thank you for your contribution!