Back

[SOLVED] Document Search => Fuzzy Search

  • 0
  • Self Hosted
Mickaël LT
16 Feb, 2023, 10:12

Hi,

Is there any way to do some fuzzy search for an attribute in my database ? I want to search for some users but with approximation, so if this is not possible any idea to bypass that ?

Thanks.

TL;DR
Solution: The user was seeking a way to implement fuzzy search or approximate search for an attribute in their database. The suggested solution was to periodically crawl the database and add its contents to an external search service like Meilisearch or Elasticsearch. Another suggestion was to directly access the MariaDB instance. Fulltext indexes were also mentioned as a possible solution. Ultimately, the team did not have a feature for fuzzy search, but the user was recommended to try using Meilisearch with Appwrite for integration with other frameworks and services.
joeyouss
16 Feb, 2023, 13:50

Hi, so I checked with the team, we do not have that feature established already BUT you could maybe have to try some tweaking on your own, you could try https://www.meilisearch.com/ with Appwrite. One of the key features of Appwrite is the ease with which it can be integrated with other frameworks and services!

Mickaël LT
16 Feb, 2023, 14:42

hum ok, so the main idea behind is to create a function that is triggered each time my collection have modification to import all into meilisearch, and then use a webservice exposed by meilisearch to search my content ?

joeyouss
16 Feb, 2023, 14:51

quite the idea, however you can also (at the start when you define your database) write your own segregation and store them, for example, if you know you might need to search for emails with the help of the string after the "@" symbol, then at the time of storage, you can write something that splits the string and stores as you require. This might require previous knowledge of your search type which is not the ideal case always, hence the external search engine

VincentGe
16 Feb, 2023, 14:52

Have you tried fulltext index btw?

VincentGe
16 Feb, 2023, 14:52

I think most of the time, you'll get enough hits with fulltext indexes

VincentGe
16 Feb, 2023, 14:52

Like it'll do partial matches

VincentGe
16 Feb, 2023, 14:53

Idk what degree of "fuzziness" you need

Mickaël LT
16 Feb, 2023, 14:55

I'll publish a first version with partial matches, but in a later release i want to gave more result to the users, for exemple when he search "mikael" I want to retrieve some result with "mickael", and I don't think it is possible with fulltext

joeyouss
16 Feb, 2023, 14:58

makes sense, then an external search service can be helpful

VincentGe
16 Feb, 2023, 15:02

🤔 Yeah that sounds about right. You could also access the mariadb instance directly, too.

VincentGe
16 Feb, 2023, 15:02

Periodically craw the DB and add it to like meilisearch, elasticsearch, what ever you wanna use

VincentGe
16 Feb, 2023, 15:03

Bypass some of the API overhead

joeyouss
16 Feb, 2023, 15:03

@Mickaël LT is your query answered? If not, please let us know how we can help you better and if it is, shall I mark this thread as solved?

Mickaël LT
16 Feb, 2023, 15:35

Yes, you can mark this solved, I'll complete later if I found a good implementation for this use case

joeyouss
16 Feb, 2023, 15:55

awesome!

joeyouss
16 Feb, 2023, 15:56

[SOLVED] Document Search => Fuzzy Search

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