Back

Text Search Failure On Request

  • 0
  • Databases
andrewmoore
27 May, 2023, 00:11

I have a text attribute in a collection that has a full-text index on it. There are a number of documents that contain the value "r1_REPORT". When I perform a query of:

Query.search('sa_notes', "r1_REPORT")

I get no results. However, when I run a query of:

Query.search('sa_notes', "r1_R")

I get the result I expect. If there are any more characters present beyond the uppercase R, the search fails. I have tried using escaped quotes in the search too, but to no success.

How am I supposed to accurately query Appwrite for this?

TL;DR
The user is experiencing issues with text search in Appwrite after upgrading to version 1.3.4. They mention that searching with underscores is not working properly and that even the startsWith query is failing. The user is asking if this issue will be fixed in a subsequent release. Another user points out that there is a related issue on GitHub. The solution suggested is to use the startsWith query instead of the search query. TL;DR: User is unable to perform accurate text search in Appwrite after upgrading to version 1.3.4. Using underscores and startsWith queries both fail. It is suggested to use starts
Drake
27 May, 2023, 00:14

We actually just received an issue similar to this...I think there's something weird going on with the underscore. related issue: https://github.com/appwrite/appwrite/issues/5546

can you use the startsWith query instead of search?

andrewmoore
27 May, 2023, 00:16

startsWith() fails if I search for the full term, but succeeds if I search for "r1_REPOR"

andrewmoore
27 May, 2023, 00:20

I fairly recently upgraded to appwrite:1.3.4 and started noticing issues when trying to search like this in other areas - again with underscores.

Drake
27 May, 2023, 00:27

yes...searching changed a bit in 1.3.x

andrewmoore
27 May, 2023, 00:28

Is this something that will be triaged, or left for a subsequent release?

Drake
27 May, 2023, 00:30

We've only started investigating this.

That said, a release would need to be made to change this.

andrewmoore
27 May, 2023, 00:32

Okay. Good to know. Thanks.

andrewmoore
27 May, 2023, 00:33

Are things like this tested with new releases? This has pretty seriously crippled the application I've written with Appwrite.

andrewmoore
27 May, 2023, 00:35

It was working fine in < 1.3, but there was the severe limitations with search indexes, so it's not really practical to roll back either, sadly.

Drake
27 May, 2023, 00:36
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more