Skip to main content
A pinned item can become unavailable if an active filter excludes it—for example, because it’s out of stock—or you remove it from the . When that happens, Algolia fills its position with the next organic result, leaving gaps in your curation. A pin block groups contiguous pinned items so they behave as a unit. If one item in the block becomes unavailable, the remaining pinned items shift up. Algolia fills positions with only after all available pinned items in the block have been placed.

Pin block boundaries

A pin block is a set of adjacent pinned positions with no unpinned position between them. An unpinned position splits the pins into separate blocks. For example, pins at positions 1, 2, 3, 6, 7, and 8 form two pin blocks: one covering positions 1 to 3 and one covering positions 6 to 8.
  • If you unpin an item inside a block, the remaining items stay together and the block’s start position doesn’t change.
  • If you add a pin between two pins in a block, it joins that block.
  • A rule can contain several pin blocks.

Enable pin blocks

To enable pin blocks for a rule, turn on Shift pins to close gaps in the Visual Editor.
1

Open the Visual Editor

  1. Go to the Algolia dashboard and select your Algolia .
  2. On the left sidebar, select Search.
  3. Select your Algolia .
  4. Select Rules from the left sidebar.
  5. Select Create your first Rule or New rule.
  6. Click Visual Editor.
2

Turn on pin blocks

Under Consequences, click Pin items, then turn on Shift pins to close gaps.
3

Pin your items

Pin items at adjacent positions to create a pin block. The Visual Editor labels each block so you can see which items stay together.
4

Publish the rule

Click Apply, then Review and Publish your rule.

Default pin block behavior

Shift pins to close gaps is on for new rules and off for rules that already exist. It stays off on existing rules to avoid changing live curation, so turn it on manually where you want it. For existing rules created with the API that contain groups of pinned items, the Visual Editor shows the setting as on.

Filter matching requirements

Shift pins to close gaps depends on Must match active filters. If you turn off that setting, the Visual Editor turns off pin blocks and disables the setting. For more information, see Promote results matching active filters.

Pin block limits

Pin blocks don’t change the limit on pinned items: by default, you can pin up to per rule. A single pin block can hold up to that limit, and there’s no separate limit on the number of blocks per rule.

See also

Last modified on August 20, 2026