Skip to content

Document that Elasticsearch/OpenSearch user search does not match email address - #9116

Open
ewwollesen wants to merge 4 commits into
masterfrom
docs/es-user-search-email-limitation
Open

Document that Elasticsearch/OpenSearch user search does not match email address#9116
ewwollesen wants to merge 4 commits into
masterfrom
docs/es-user-search-email-limitation

Conversation

@ewwollesen

@ewwollesen ewwollesen commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Elasticsearch and AWS OpenSearch-backed user search matches on username, nickname, and first and
last name only — email address is not indexed and cannot be matched. Database-backed user search
does match on email, so enabling enterprise search silently removes email matching from user
search.

This was previously undocumented. The Enterprise search limitations list did not mention it, and
the admin onboarding guide's "Enable Elasticsearch" step stated that Elasticsearch "solve[s] many
known issues with full text database search, such as dots, dashes, and email addresses returning
unexpected results" without scoping that to message search — which reads as though email handling
improves.

Changes:

  • Add a fourth item to Enterprise search limitations describing the behavior, including which
    user searches are still database-backed and still match email, and the Show email address
    dependency for non-admins.
  • Scope the onboarding-guide sentence to message search and link to the limitations list.
  • Drive-by grammar fix in the same list: item 1 read "Elasticsearch and AWS OpenSearch uses a
    standard selection of stop words"; the subject is plural, so this is now "use". Committed
    separately (9236ddce) for easy review. This is the only occurrence in source/.

Reported by an Enterprise customer who diagnosed it from GET users/_mapping after migrating to
AWS OpenSearch.

🤖 Generated with Claude Code

Elasticsearch and AWS OpenSearch-backed user search matches on username,
nickname, and first and last name only. Email addresses aren't indexed, so
enabling enterprise search silently removes email matching from user search.

Add a fourth Enterprise search limitation covering the behavior, which user
searches remain database-backed, and the Show email address dependency for
non-admins. Scope the admin onboarding sentence to message search and link
to the limitations list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 28, 2026 16:51
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 777bd16e-c530-4288-a3d6-f4d7beb0ba5c

📥 Commits

Reviewing files that changed from the base of the PR and between e77ff8d and 36a547d.

📒 Files selected for processing (1)
  • source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst

📝 Walkthrough

Walkthrough

The documentation adds enterprise search limitations for user search and autocomplete, including email matching differences, and updates onboarding guidance to require reviewing those limitations before enabling Elasticsearch or AWS OpenSearch.

Changes

Enterprise search documentation

Layer / File(s) Summary
Search limitations and onboarding guidance
source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst, source/administration-guide/upgrade/admin-onboarding-tasks.rst
Documents enterprise user-search field matching, including email rules for administrators, other users, and the System Console users list, and directs administrators to review these limitations before enabling enterprise search.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: Elasticsearch/OpenSearch user search no longer matches email addresses.
Description check ✅ Passed The description accurately describes the search-behaviour documentation updates and related onboarding guidance changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/es-user-search-email-limitation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Pull request overview

This PR updates Mattermost Enterprise documentation to clarify that when Elasticsearch/AWS OpenSearch backs user search/autocomplete, it does not match email addresses (because emails aren’t indexed), and to prevent the admin onboarding guide from implying email-related improvements apply to user search.

Changes:

  • Add an explicit limitation explaining email address matching differences between Elasticsearch/OpenSearch-backed user search and database-backed user search (including the Show email address dependency for non-admins).
  • Update the admin onboarding guide to scope “email address” search improvements to message search, and link readers to the Enterprise search limitations section.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
source/administration-guide/upgrade/admin-onboarding-tasks.rst Clarifies that Elasticsearch/OpenSearch improves message search behavior and points admins to Enterprise search limitations before enabling.
source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst Documents the user search/autocomplete limitation (no email matching) when backed by Elasticsearch/AWS OpenSearch.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst`:
- Line 53: Update the final sentence in the user-search documentation to state
that email matching requires the Show email address setting only for users who
lack permission to view email addresses, while preserving the existing
system-admin behavior and search-scope details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f467a945-f0be-42b1-bb02-00b4fbd7a31a

📥 Commits

Reviewing files that changed from the base of the PR and between f42d7a3 and abe8b60.

📒 Files selected for processing (2)
  • source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst
  • source/administration-guide/upgrade/admin-onboarding-tasks.rst

@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA abe8b60

The subject "Elasticsearch and AWS OpenSearch" is plural, so item 1 takes
"use" rather than "uses".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 9236ddc

Reframe the Show email address dependency so the system admin behavior is
stated affirmatively rather than implied by a negative carve-out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA e77ff8d

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst:53

  • Editor Evie (Friction): Item 4 reads as internally inconsistent: it first says database-backed user searches "continue to match on email address" (unqualified), then later says email matching depends on admin status / the Show email address setting. Rephrasing to clarify that the database-backed searches can match email only under the usual privacy rules would prevent readers from misinterpreting which UIs still support email lookup when enterprise search is enabled.
4. User search and autocomplete served by Elasticsearch or AWS OpenSearch match on username, nickname, and first and last name only. Email addresses aren't indexed, so users can't be found by email address. User searches served from the database continue to match on email address, including the **System Console > User Management > Users** list, and channel and team member searches. System admins can always match on email address. For all other users, email address matching also requires :ref:`Show email address <administration-guide/configure/site-configuration-settings:show email address>` to be enabled.

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

Overall LGTM. Left one comment regarding clarification for system admin users, but everything else checks out.

The sentence "System admins can always match on email address" sat after the
Elasticsearch and AWS OpenSearch statements, implying system admins are exempt
from the limitation. They aren't: the index has no email field, and the
manage_system exemption is consumed only by the SQL store, so it cannot affect
the Elasticsearch or AWS OpenSearch query path.

Attach scope to each claim: no user matches on email under enterprise search,
system admins and the Show email address setting apply to channel and team
member searches, and the System Console user list is independent of that
setting because it is served by the reporting API.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 36a547d

@ewwollesen
ewwollesen requested a review from esethna July 28, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants