diff --git a/source/administration-guide/configure/environment-configuration-settings.rst b/source/administration-guide/configure/environment-configuration-settings.rst index 908762f2883..23d5eb3ff6e 100644 --- a/source/administration-guide/configure/environment-configuration-settings.rst +++ b/source/administration-guide/configure/environment-configuration-settings.rst @@ -1559,6 +1559,38 @@ Enable Elasticsearch for autocomplete queries Autocompletion results may be incomplete until a bulk index of the existing users and channels database is finished. +.. config:setting:: enable-search-public-channels-without-membership + :displayname: Allow searching public channels without membership (Elasticsearch) + :systemconsole: Environment > Elasticsearch + :configjson: .ElasticsearchSettings.EnableSearchPublicChannelsWithoutMembership + :environment: MM_ELASTICSEARCHSETTINGS_ENABLESEARCHPUBLICCHANNELSWITHOUTMEMBERSHIP + :description: Allow users to search for messages in public channels they have not joined. + + - **true**: Users can find messages in public channels they haven't joined, scoped to teams they belong to. + - **false**: **(Default)** Users can only search messages in channels they are a member of. + +Allow searching public channels without membership +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| Allow users to search for messages in public channels they | - System Config path: **Environment > Elasticsearch** | +| have not joined. | - ``config.json`` setting: ``ElasticsearchSettings`` > ``EnableSearchPublicChannelsWithoutMembership`` | +| | > ``false`` | +| When enabled for the first time, existing posts are updated | - Environment variable: | +| in the background with channel type information. This | ``MM_ELASTICSEARCHSETTINGS_ENABLESEARCHPUBLICCHANNELSWITHOUTMEMBERSHIP`` | +| backfill process is throttled to ~10,000 posts per second to | | +| avoid impacting search performance. | | +| | | +| - **true**: Users can find messages in public channels they | | +| haven't joined, scoped to teams they belong to. | | +| - **false**: **(Default)** Users can only search messages in | | +| channels they are a member of. | | ++---------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + +.. note:: + + This setting has no effect when :ref:`Compliance Mode ` is enabled. When Compliance Mode is active, search results are always restricted to channels the user is a member of. + .. config:setting:: post-index-replicas :displayname: Post index replicas (Elasticsearch) :systemconsole: N/A diff --git a/source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst b/source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst index 99504c07a60..753588f02ab 100644 --- a/source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst +++ b/source/administration-guide/scale/common-configure-mattermost-for-enterprise-search.rst @@ -44,4 +44,4 @@ Enterprise search limitations 1. Elasticsearch and AWS OpenSearch uses a standard selection of "stop words" to keep search results relevant. Results for the following words will not be returned: "a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", and "with". 2. Searching stop words in quotes returns more results than just the searched terms (`ticket `__). -3. Search results are limited to a user's team and channel membership. This is enforced by the Mattermost server. The entities are indexed in Elasticsearch or AWS OpenSearch in a way that allows Mattermost to filter them when querying, so the Mattermost server narrows down the results on every Elasticsearch or AWS OpenSearch request applying those filters. +3. By default, search results are limited to a user's team and channel membership. This is enforced by the Mattermost server. The entities are indexed in Elasticsearch or AWS OpenSearch in a way that allows Mattermost to filter them when querying, so the Mattermost server narrows down the results on every Elasticsearch or AWS OpenSearch request applying those filters. From Mattermost v11.6, admins can :ref:`allow searching public channels without membership ` so that users can find messages in public channels they haven't joined, scoped to teams they belong to. diff --git a/source/end-user-guide/collaborate/search-for-messages.rst b/source/end-user-guide/collaborate/search-for-messages.rst index 77835300e3a..8f5e0b8d38e 100644 --- a/source/end-user-guide/collaborate/search-for-messages.rst +++ b/source/end-user-guide/collaborate/search-for-messages.rst @@ -193,6 +193,14 @@ To search for messages containing hashtags, select a hashtag in an existing post Hashtags don't link to channels. If you have a channel named “Marketing”, selecting a ``#marketing`` hashtag does not take you to the Marketing channel. To link to public channels, use the tilde ``~`` symbol followed by the channel name. For example ``~marketing``. +Search public channels you haven't joined +------------------------------------------ + +.. include:: ../../_static/badges/ent-plus.rst + :start-after: :nosearch: + +From Mattermost v11.6, when your system admin :ref:`enables searching public channels without membership `, search results can include messages from public channels you haven't joined. Results are scoped to teams you belong to, so you'll only see messages from public channels in your teams. This setting doesn't affect private channels — you can only search private channels you're a member of. + Notes about performing Mattermost searches -------------------------------------------