ftSpellCheck method

Future ftSpellCheck(
  1. String index,
  2. String query, {
  3. List options = const [],
  4. bool forceRun = false,
})

FT.SPELLCHECK index query DISTANCE dist TERMS ...

Performs spell correction on a query.

  • index: The index name.
  • query: The query to spell check.
  • options: Options like DISTANCE or TERMS INCLUDE/EXCLUDE.
  • forceRun: If true, attempts to execute even if connected to Valkey.

Note: Not currently supported in Valkey.

Implementation

Future<dynamic> ftSpellCheck(
  String index,
  String query, {
  List<dynamic> options = const [],
  bool forceRun = false,
}) async {
  await checkValkeySupport('FT.SPELLCHECK', forceRun: forceRun);
  final cmd = <dynamic>['FT.SPELLCHECK', index, query, ...options];
  return execute(cmd);
}