Skip to content

fix(utils): Typecasting non-text fields in FTS - #12729

Merged
olivermrbl merged 2 commits into
developfrom
fix/non-text-searchables
Jun 13, 2025
Merged

fix(utils): Typecasting non-text fields in FTS#12729
olivermrbl merged 2 commits into
developfrom
fix/non-text-searchables

Conversation

@olivermrbl

Copy link
Copy Markdown
Contributor

What

Fix the typecasting for non-text properties in our FTS

Why

Currently, the ::text casting is considered part of the column name leading to the following error (in the case of orders):

column o0.display_id::text does not exist

How

Use raw typecasting flavor introduced in MikroORM v6

mikro-orm/mikro-orm#4774 (comment)


Separately, this PR also adds support for defining the autoincrement modifier as searchable.

@olivermrbl
olivermrbl requested a review from a team as a code owner June 13, 2025 08:27
@vercel

vercel Bot commented Jun 13, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2025 10:29am
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Jun 13, 2025 10:29am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
cloud-docs ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am
user-guide ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 10:29am

@olivermrbl

Copy link
Copy Markdown
Contributor Author

@adrien2p, let me know if this makes sense.

@adrien2p adrien2p left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think it make sense to have

Comment thread packages/core/utils/src/dml/properties/autoincrement.ts
@olivermrbl
olivermrbl force-pushed the fix/non-text-searchables branch from 291b6c8 to cc15813 Compare June 13, 2025 09:42
@changeset-bot

changeset-bot Bot commented Jun 13, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d8d47b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@olivermrbl
olivermrbl merged commit b79215d into develop Jun 13, 2025
17 checks passed
@olivermrbl
olivermrbl deleted the fix/non-text-searchables branch June 13, 2025 11:18
@juanzgc

juanzgc commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

Related SUP-1838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot search orders by display id or relations searcahable properties

3 participants