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

Fix list collections when passing search parameter #2638

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

abnegate
Copy link
Contributor

What does this PR do?

Add fulltext index for collections collection name column to fix listCollections when using the search parameter.

Currently throws a PDOException:

[Error] File: /usr/src/code/vendor/utopia-php/framework/src/App.php
[Error] Line: 756
[Error] Type: PDOException
[Error] Message: Can't find FULLTEXT index matching the column list
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64

Test Plan

Used the listCollections function from SDK's passing a value for the search parameter

Related PRs and Issues

Closes appwrite/sdk-for-kotlin#18

@eldadfux
Copy link
Member

@abnegate you're on 🔥 today!

@TorstenDittmann
Copy link
Contributor

TorstenDittmann commented Jan 18, 2022

We are actually using the search parameter which contains the collection id and name => https://github.com/appwrite/appwrite/blob/master/app/controllers/api/database.php#L180

We only need to change this https://github.com/appwrite/appwrite/blob/master/app/controllers/api/database.php#L233 to the search attribute 👍🏻

We should also add a test for this, searching once for the ID and the name 🙂

@abnegate abnegate changed the title Add fulltext index for collections collection name column Fix list collections when passing search parameter Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Using only search parameter in listCollections results in Error
3 participants