setQueryType method

AlgoliaQuery setQueryType(
  1. QueryType value
)

QueryType

Controls if and how query words are interpreted as prefixes.

Options:

  • prefixLast: Only the last word is interpreted as a prefix (default behavior).
  • prefixAll: All query words are interpreted as prefixes. This option is not recommended, as it tends to yield counterintuitive results and has a negative impact on performance.
  • prefixNone: No query word is interpreted as a prefix. This option is not recommended, especially in an instant search setup, as the user will have to type the entire word(s) before getting any relevant results.

Source: Learn more

Implementation

AlgoliaQuery setQueryType(QueryType value) {
  assert(!_parameters.containsKey('queryType'));
  return _copyWithParameters(
      <String, dynamic>{'queryType': value.toString().split('.').last});
}