8000 Add lowercase index for searching users by attribute by resah · Pull Request #54578 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Add lowercase index for searching users by attribute - #54578

Open
resah wants to merge 1 commit into
keycloak:mainfrom
bare-id:feat/search-index-user-attr
Open

resah wants to merge 1 commit into
keycloak:mainfrom
bare-id:feat/search-index-user-attr

Conversation

@resah
@resah resah commented Nov 3, 2026
Copy link
Copy Markdown
Contributor

Closes #37454

@resah
resah requested a review from a team as a code owner November 3, 2026 12:22
Copilot AI balanced review requested due to automatic review settings November 3, 2026 12:22
Copilot AI 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.

🟡 Changes recommended

The unguarded expression-index changeset fails on supported databases such as SQL Server, blocking schema migrations for fresh installations and upgrades.

1 open issue
What changed in this PR

This PR addresses #37454 by adding an index intended to speed up case-insensitive user-attribute searches in Keycloak’s JPA storage.

Changes:

  • Adds a composite index on USER_ATTRIBUTE using NAME and LOWER(VALUE).
  • Registers the 27.0.0 migration in the master changelog.
  • Documents the new index in the upgrade guide.
File Description
model/​jpa/​src/​main/​resources/​META-INF/​jpa-changelog-master.xml Includes the 27.0.0 changelog.
model/​jpa/​src/​main/​resources/​META-INF/​jpa-changelog-27.0.0.xml Defines the lowercase attribute-value index.
docs/​documentation/​upgrading/​topics/​changes/​changes-27_0_0.adoc Describes the index’s intended search-performance benefit.

Review effort: Balanced

@resah
resah force-pushed the feat/search-index-user-attr branch from 2158113 to f67d509 Compare November 3, 2026 12:47
Copilot AI balanced review requested due to automatic review settings November 3, 2026 12:47
Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the user-attribute search index change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@vramik vramik 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.

Thank you @resah

@vramik
vramik requested a review from pedroigor November 6, 2026 09:26
@pedroigor
Copy link
Copy Markdown
Contributor

@resah, would you mind rebasing and solving conflicts?

pedroigor
pedroigor previously approved these changes Nov 11, 2026
Closes keycloak#37454

Signed-off-by: Theresa Henze <theresa.henze@bare.id>
@resah
resah force-pushed the feat/search-index-user-attr branch from f67d509 to 5790d40 Compare November 12, 2026 09:35
Copilot AI balanced review requested due to automatic review settings November 12, 2026 09:35
@resah
resah commented Nov 12, 2026
Copy link
Copy Markdown
Contributor Author

@resah, would you mind rebasing and solving conflicts?

@pedroigor Done

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the user-attribute search index change.

No open issues 🎉

Review effort: Balanced

@pedroigor
Copy link
Copy Markdown
Contributor

@resah, sorry, asking you again, can you rebase it?

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.

UserAttribute queries should have an index for lower(value)

4 participants

0