Highlights
Search Module
The Search Module allows you to manage and search through indexes defined in your Medusa application. You can search products or any data model defined just by defining an index for it.
The Search Module supports providers that integrate a search engine to perform the search operations. Out of the box, Medusa provides a PostgreSQL Search Module Provider and Medusa Search for Medusa Cloud users.
Read the announcement to learn about the new search features.
Example of a product index:
import {
defineSearchIndex,
graphConsume,
graphSeed,
search,
} from "@medusajs/framework/utils"
const source = {
fields: [
"id",
"title",
"description",
"handle",
"thumbnail",
"status",
"categories.id",
"categories.name",
"categories.handle",
"tags.id",
"tags.value",
],
}
export const productIndex = defineSearchIndex({
name: "product",
entity: "product",
fields: search.define({
id: search.keyword().filterable(),
title: search.text().searchable({ weight: 3 }),
description: search.text().searchable(),
handle: search.keyword().filterable(),
thumbnail: search.keyword(),
categories: search
.object({
id: search.keyword().filterable(),
name: search
.keyword()
.searchable()
.facetable(),
handle: search.keyword().filterable(),
})
.array(),
tags: search
.object({
id: search.keyword().filterable(),
value: search
.keyword()
.searchable()
.facetable(),
})
.array(),
}),
events: [
"product.created",
"product.updated",
"product.deleted",
],
consume: graphConsume(source),
seed: graphSeed(source),
})You can the enable storefront searching for it, and search it with the new /store/search API route.
Learn more about the Search Module and how to set it up in the documentation.
Using Algolia or MeiliSearch?
Learn how to migrate to the Search Module in the following guides:
Loyalty Plugin: Store Credit Improvements
We've made improvements to the loyalty plugin:
- You can debit a store credit account from the admin dashboard. Learn more in the documentation.
- You can create a store-credit account directly from the customer's details page in the admin.
New Admin Translations
- Finnish (fi) translations have been added to the admin dashboard (#16746) — thanks @SanteriMoilanen.
- Swedish (sv) translations have been added to the admin dashboard (#16808) — thanks @StudioKW.
Bug Fixes
- Auth emailpass: an actor-less identity that was previously registered must now use the same password when re-registering (#16890).
- Auth config: default
http.authMethodsPerActorvalues are now applied correctly and the/auth/:auth_provider/userroute is gated by config (#16816). - Disabled the store-credit payment option when there is no outstanding amount or the customer is a guest (#16852).
- Included
shipping_addressin the order list query so the country column renders correctly (#16677) — thanks @MarcelRoblek. - Completed the Turkish translation (306 previously missing keys) (#16820) — thanks @Markheris.
- Updated Croatian translations (#16743) — thanks @luxapan.
- Mutations performed inside step compensation functions are now correctly
awaited (#16573) — thanks @ebrahim2355. - An inventory item is now created when
manage_inventoryis enabled on a product variant (#16269) — thanks @KallinikosMil. - Vector fields are now filtered out on the Postgres search provider (#16891).
- The environment handle is now correctly retrieved from the endpoint basic-auth config (#16834).
- Graph helpers now accept a
loadproperty (#16905). - Context can now be passed through to graph helpers for search (#16903).
- Stripe: webhook signature verification errors are now handled gracefully instead of crashing the handler (#16228) — thanks @calebcgates.
requested_atis now set when a return is created from the storefront (#16436) — thanks @thomassarazin.- Wildcard cache clears now correctly reset the internal size counter (#16607) — thanks @ebrahim2355.
deepEqualObjnow comparesDatevalues by their time value rather than by reference (#16749) — thanks @yfwmaniish.- The
--skip-migrationsflag now actually skips migrations (#16467) — thanks @tushardev-365. reactandreact-domare now deduped in the admin Vite config to prevent duplicate-React issues in custom extensions (#16620) — thanks @bohetangQAQ.failOnError: falseis now passed to the lint step during build so a lint warning no longer fails the build (#16648) — thanks @itzzdev09.- The
link-create-keys-modules-enumrule now only triggers on actual link methods and steps, reducing false positives (#16851). - The full error object is now logged instead of
undefinedwhen a test runner hook fails (#16842).
Community Contributors
Thank you to everyone who contributed to this release:
- @SanteriMoilanen — Finnish admin translations
- @StudioKW — Swedish admin translations
- @Markheris — Turkish translation completion
- @luxapan — Croatian translation updates
- @MarcelRoblek — shipping address in order list query
- @ebrahim2355 — step compensation awaiting, wildcard cache size reset
- @KallinikosMil — inventory item creation on manage_inventory enable
- @calebcgates — Stripe webhook signature error handling
- @thomassarazin — requested_at on storefront returns
- @yfwmaniish — Date comparison fix in deepEqualObj
- @tushardev-365 — migration skip flag fix
- @bohetangQAQ — React deduplication in admin bundler
- @itzzdev09 — failOnError in build lint step
- @leobenzol — CI badge fix for cancelled runs