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 Report: Can't Search Relationship #5454

Closed
2 tasks done
stnguyen90 opened this issue Apr 28, 2023 · 1 comment · Fixed by appwrite/console#439
Closed
2 tasks done

🐛 Bug Report: Can't Search Relationship #5454

stnguyen90 opened this issue Apr 28, 2023 · 1 comment · Fixed by appwrite/console#439
Assignees
Labels
bug Something isn't working product / console Console, UI and UX issues

Comments

@stnguyen90
Copy link
Contributor

👟 Reproduction steps

  1. Create collections A and B w/ relationships (e.g. 1 to 1 from A to B)
  2. Create a document in collection A and copy the ID
  3. Try to create a document in collection B and try to search for the ID from collection A

👍 Expected behavior

The search should find the document

👎 Actual Behavior

The search doesn't:

image

Appwrite logs:

appwrite  | [Error] Timestamp: 2023-04-28T16:33:26+00:00
appwrite  | [Error] Method: GET
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
appwrite  | [Error] Type: Appwrite\Extend\Exception
appwrite  | [Error] Message: Searching by attribute "$id" requires a fulltext index.
appwrite  | [Error] File: /usr/src/code/app/controllers/api/databases.php
appwrite  | [Error] Line: 2906

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database. labels Apr 28, 2023
@abnegate
Copy link
Contributor

abnegate commented May 1, 2023

@stnguyen90 You can't use a search query (MATCH AGAINST) on a column that doesn't have a full-text index, this is a limitation of the database itself. The console will need to do something else here:

https://github.com/appwrite/console/blob/main/src/routes/console/project-%5Bproject%5D/databases/database-%5Bdatabase%5D/collection-%5Bcollection%5D/document-%5Bdocument%5D/attributes/relationship.svelte#L64

cc @TorstenDittmann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / console Console, UI and UX issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants