we have a search form for our customer collection, which allows users to search over multiple fields. Unfortunately it’s plagued by all kinds of problems.
Some issues are:
- Paste an email into the search field (filter): results won’t show
- Results which are not already included in the subscription might not show up
- New customers may not show up in search for as long as a minute or more.
- Search is generally slow, weird, buggy (same search, inconsistent results)
Originally we used regex in the subscription but was told it by Atlas we should avoid this because leading wildcard queries won’t use the indexes and this is problem is multiplied for each field queried. So we added the text index but now I think the problem is that the text index may need time to index new entries and also there are slight differences in results which passing the params to the text search for the subscription and when apply those params in regex on the client, and those mismatches result in gaps in the data.
What are most people doing in situations like this?