The search term was formatted into LOWER(%s) and passed as the *value* of the
LIKE, so the function name ended up inside the pattern:
slug_name LIKE '%LOWER(coco)%'
That can never match. Only the display_name clause did any work, and LIKE is
case-sensitive on Postgres, so searching a tag by the name it is written in
returns nothing:
slug_name=Coco -> matches
slug_name=coco -> no match
Tags are lower case by convention, so lower case is what users type, and the
filter appears to report that no such tag exists.
Lower both sides instead. The term normalisation is extracted so it can be
covered by a test without a database.
- Added a new vector search syncer to aggregate questions and answers with comments for vector embedding.
- Introduced a new VectorSearch interface and related structures for managing vector storage and similarity search.
- Refactored embedding service to delegate semantic search to the new vector search plugin.
- Removed embedding-related fields from SiteAIProvider and UI forms as part of the transition to the new vector search architecture.
- Updated plugin registration to include vector search capabilities.
- Cleaned up embedding service methods and removed unused dependencies.
* fix race condition for registering handler
* add close method
* use generics to reduce duplication
* rename packages to drop underscore for go convention
* rename interface to drop stutter with package name
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
- [x] create file_record table
- [x] avatar and branding files are added to file_record
- [x] branding files are being deleted
- [x] avatar files are being deleted
- [x] reload latest avatar (frontend) after backend state is being
updated
problems addressed in the pr:
- clean up job fails, because it cannot access file_record table
- avatar and branding files are not added to the file_record table
- avatar and branding files are never deleted
- after an avatar is being updated/deleted, the old file is still being
requested due to browser caching. This is causing error logs ("no such
file or directory") in the backend.
cf. conversation in [pr
1326](https://github.com/apache/answer/pull/1326)
---------
Co-authored-by: broccoli <lekker.broccoli@gmail.com>
Co-authored-by: LinkinStars <linkinstar@foxmail.com>