issue-6: add is_special to products sortableAttributes #7

Merged
david merged 1 commit from feature/issue-6/add-is_special-to-products-sortableattributes into main 2026-09-20 03:26:19 +00:00
Owner

Adds is_special to sortableAttributes in shoppy-products.json.

Meilisearch's sortableAttributes is an explicit allow-list — a sort on an attribute outside it is rejected with 400 invalid_search_sort. The BFF's specials_first category sort sends is_special:desc, which against the live index currently fails:

400 invalid_search_sort: Attribute `is_special` is not sortable.
Available sortable attributes are:
`categoryListingRank, price.amountAsCents, price.comparativePricing.priceAsCents`.

Also syncs the README products-settings table with the file: it gains the is_special row, and picks up the attribute ranking rule that #3 added but the table never reflected.

Verified on a scratch index: with this file applied, sort: ["is_special:desc"] returns 200 ordered 2 → 1 → 0.

Note the file alone is not sufficient for the existing index — product-sync applies settings only on index creation, so it needs a one-off settings PATCH (product-sync#16).

Closes #6

Adds `is_special` to `sortableAttributes` in `shoppy-products.json`. Meilisearch's `sortableAttributes` is an explicit allow-list — a sort on an attribute outside it is rejected with `400 invalid_search_sort`. The BFF's `specials_first` category sort sends `is_special:desc`, which against the live index currently fails: ``` 400 invalid_search_sort: Attribute `is_special` is not sortable. Available sortable attributes are: `categoryListingRank, price.amountAsCents, price.comparativePricing.priceAsCents`. ``` Also syncs the README products-settings table with the file: it gains the `is_special` row, and picks up the `attribute` ranking rule that #3 added but the table never reflected. Verified on a scratch index: with this file applied, `sort: ["is_special:desc"]` returns `200` ordered `2 → 1 → 0`. Note the file alone is not sufficient for the existing index — `product-sync` applies settings only on index creation, so it needs a one-off settings `PATCH` (product-sync#16). Closes #6
Meilisearch's sortableAttributes is an explicit allow-list; a sort on an
attribute outside it is rejected with 400 invalid_search_sort. The BFF's
specials_first category sort sends `is_special:desc` (ADR-0002,
product-sync#11), so the attribute must be declared here or that sort
fails against every index built from these settings.

Also syncs the README products-settings table with the file: it gains the
`is_special` row and picks up the `attribute` ranking rule that issue #3 added
to `shoppy-products.json` but the table never reflected.

Closes #6
david merged commit 7680977150 into main 2026-09-20 03:26:19 +00:00
david deleted branch feature/issue-6/add-is_special-to-products-sortableattributes 2026-09-20 03:26:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
shoppy/shoppy-index-configuration!7
No description provided.