Skip to content
Back

Search fulltext with dash "-" symbol

  • 0
  • Databases
outrelouxhe
18 Jun, 2023, 10:14

Hello. I have an text attribute which is fulltext indexed. In some documents I have the context which is like "example b-04 text". I would like to be able to search on the "b-04" string but the query doesn't return any document. I guess the problem is related to the dash "-" symbol. Do you have any suggestion how to work with this ? Thank you

TL;DR
User is experiencing an issue with the fulltext search in a text attribute that includes a dash symbol ("-"). They suspect that the dash symbol is causing the search query to not return any results. They also mention a bug with underscores but are not sure if it is related. They provide a link to a GitHub issue for reference. Another user suggests substituting the dash symbol with an underscore symbol ("_") which should make it work. The user also mentions that short words may also be causing the issue and provides another GitHub discussion for reference.
Drake
18 Jun, 2023, 15:10

The problem is partially the dash, but also the short words. See https://github.com/appwrite/appwrite/discussions/5005

outrelouxhe
18 Jun, 2023, 15:13

OK. I will make a substitution of "-" with "_". I will make it invisible to the user and it should work. Thank you!

Drake
18 Jun, 2023, 15:14

However, I think our latest version has a bug with underscores. I think it's fixed but hasn't been released yet

https://github.com/appwrite/appwrite/issues/5546

outrelouxhe
18 Jun, 2023, 15:16

I'm currently on 1.2. Is the bug also present there?

Drake
18 Jun, 2023, 15:16

No I don't think so

outrelouxhe
18 Jun, 2023, 15:17

OK I'll try this way and let you know if there is any issue.

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