dify icon indicating copy to clipboard operation
dify copied to clipboard

fix: Count exception occurs when searching conversations

Open Gaocarri opened this issue 1 year ago • 3 comments

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) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

count-error

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

Gaocarri avatar Sep 25 '24 06:09 Gaocarri

@laipz8200 hey, could u review it ?

Gaocarri avatar Sep 30 '24 06:09 Gaocarri

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.

laipz8200 avatar Sep 30 '24 06:09 laipz8200

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 avatar Sep 30 '24 06:09 Gaocarri

@Gaocarri Thank you for your contribution!

laipz8200 avatar Oct 08 '24 09:10 laipz8200