Text Search Auto-Complete

Hello, with the Beta of Atlas Text Search (thats currently in production for v 4.2.v), can we do the following auto-complete scope?

I know it can be done in ElasticSearch, but would prefer to use Mongo Text Search of possible

users/client type 2 characters in search box, then auto-complete options will show for words of only <5 characters. Once 3 characters are typed, the autocomplete shows options for all possible words (>=5 char)

I haven’t used that new $searchbeta but I know it is based on lucene; it is a full text search, and I used lucene in the past in couple projects. I think, even you use lucene directly, you need to write your own custom analyzer to do it.

Did you check out $regex operator? We needed similar functionality, and we achieved it by using $regex


I hope it works for you.

Atlas Search has released the autocomplete operator for Atlas Search ($search) and it is a much better option than using $regex for this use case. In particular, take a look at at edgeGrams and nGrams discussed here in the Atlas Search documentation.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.