DEV Community

Discussion on: Postgres Trigram indexes VS Algolia

Collapse
 
sylvainutard profile image
Sylvain Utard • Edited

Usually such ngram-search approach has 3 limitations:

  • doesn't scale very well as indexing all those ngrams will drastically increase the DB size
  • there won't be any typo-tolerance
  • hard to get great relevance because no real way to weight differently matches using ngram starting words, in the middle of the words or at the end of the words. Also, very hard to combine this when searching across multiple attributes or having business popularity/ranking to take into account.