auto-completion.sort

Background

This parameter sets the auto-completion suggestions sort order. It can take 3 values:

  • 0: Suggestions will be sorted by weight, with the most relevant ones in first.

  • 1: Suggestions will be sorted by length, with the shorter ones in first.

  • 2: Suggestions will be sorted alphabetically in ascending order.

  • 3: Suggestions will be sorted by a score calculated by alpha * weight + (1 - alpha) * length_score.

Setting the key

Set this configuration key in the results page (preferred) or search package configuration.

Use the configuration key editor to add or edit the auto-completion.sort key, and set the value. This can be set to any valid Integer value.

Default value

The default vis to sort by score.

auto-completion.sort=0

Examples

Sort suggestions by length:

auto-completion.sort=1