Back

full text search on $id attribute

  • 0
  • Databases
  • Web
sumerokr
12 Oct, 2023, 20:56

Hi. I have a collection of documents with some string attributes. This collection have a few similar full-text indexes on these attributes. I have also created one more full-text index for the indernal $id attribute.

Search over $id works differently. It only returns documents when there is a startsWith-like match. E.g. the given document with $id 12345 will be returned for the search values '12345', '123', but not for the '2345'. Is that expected?

TL;DR
The user is asking about full text search on the $id attribute in a collection of documents. They have noticed that the search only returns documents when there is a "startsWith-like" match, meaning that only values that begin with the search term are returned. They are asking if this behavior is expected. Solution: The user is directed to refer to a link for more details about how search works. It is also suggested that this information should be included on the documentation page.
Drake
13 Oct, 2023, 01:13

Yes, this is expected. See https://github.com/appwrite/appwrite/discussions/5005#discussioncomment-4681079 for details about how search works.

sumerokr
13 Oct, 2023, 07:36

You're right, got it. Thanks for the hint. Worth to mention on the https://appwrite.io/docs/products/databases/queries page, probably.

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