whereContainsWholeWord method
void
whereContainsWholeWord(})
Powerful search for containing whole words. This search is much quicker than regex and can search for whole words including whether they are case sensitive or not. This search can also order by the score of the search
Implementation
void whereContainsWholeWord(String column, String query,
{bool caseSensitive = false,
bool orderByScore = true,
bool diacriticSensitive = false}) {
queries.add(MapEntry<String, dynamic>(_singleQuery,
'"$column":{"\$text":{"\$search":{"\$term": "$query", "\$caseSensitive": $caseSensitive , "\$diacriticSensitive": $diacriticSensitive }}}'));
if (orderByScore) {
orderByAscending('\$score');
keysToReturn(['\$score']);
}
}