docs/main/end-user-guide/collaborate/search-for-messages.mdx
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
<PlanAvailability slug="all-commercial" />Use Mattermost search to find messages, replies, and the contents of files. You can also search by hashtags, perform more advanced searches using search modifiers, or adjust search results to show messages from the current team, a specific team, or all teams.
<div class="tip"> <div class="title">Tip
</div>From Mattermost v10.10, the
</div>from:search modifier is available for cross-team searches. When searching all teams, you must manually add thefrom:modifier as part of your search criteria to search by specific users across teams.
<Tip>
From Mattermost v10.8, you can also adjust your search results to show messages from the current team, a specific team, or all teams.
</Tip> <Tip>When using Mattermost in a web browser or the desktop app, you can open your current search results in a separate popout window by selecting the Open in new window icon in the search results header.
</Tip> </TabItem> <TabItem value="mobile" label="Mobile"></TabItem> </Tabs>
From the Search field, select Files to search for files attached to messages. From Mattermost v10.8 and mobile v2.28, you can specify whether you want to search all channels you're a member of in the current team, a specific team, or all channels across all teams.
File contents that match on file name, or contain matching text content within supported document types, are returned in the Search Results pane. Each search result includes file name, extension, and size details, as well as details about when and where the file was originally shared. You can adjust search results to show messages from the current team, a specific team, or all teams.
7zip (.7z) files are not supported for file content search and are skipped during search indexing for security reasons. Only standard ZIP files are supported when ZIP file search is enabled.
System admins can extend file content search support for self-hosted deployments to include:
Using Mattermost in a web browser or the desktop app, you can narrow search results further by selecting the File Type Filter option, then selecting specific file types, such as documents, spreadsheets, or images.
You can access files recently shared in a channel:
<Tabs> <TabItem value="web-desktop" label="Web/Desktop">Select the icon to the right of the channel name to access files recently shared in that channel.
Alternatively, you can select the channel name, select the View Info icon, then select Files in the right pane.
</TabItem> <TabItem value="mobile" label="Mobile">Tap the channel name to view channel options, then tap Files.
</TabItem> </Tabs>You can apply search modifiers to any search to reduce the number of results returned. Select a search modifier to add it to the Search field. Supported modifiers are described below. Your search results include messages from all of your teams.
from: and in:from: to find messages or files from specific users.
from:john.smith only returns content from your direct message history with John Smith.from: in cross-team searches to find messages from specific users across all teams you're a member of.in: to find messages or files posted in specific public channels, private channels, direct messages, or group messages. You can specify channels by display name or channel ID.
Mattermost in:town-square only returns results in the Town Square public channel that contains the term Mattermost, while searching Mattermost in:john.doe only returns results that contains the term Mattermost in your direct message history with John Smith.before:, after:, and on:Use before: to find messages or files posted before a specified date.
website before: 2018-09-01 returns messages or files containing the term website posted prior to September 1, 2018.Use after: to find messages or files posted after a specified date.
website after: 2018-08-01 returns messages or files containing the term website posted after August 1, 2018.Use both before: and after: together to search in a specified date range.
website before: 2018-09-01 after: 2018-08-01 returns all messages or files containing the term website posted between August 1, 2018 and September 1, 2018.Use on: to find messages or files posted on a specific date. Use the date picker to select a date, or type it in YYYY-MM-DD format.
website on: 2018-09-01 returns messages or files containing the term website posted on September 1, 2018.Use the hyphen - symbol to exclude terms from your search results. For example, searching test -release only returns results that include the term test and exclude the term release.
This exclusion modifier can be used in combination with other modifiers to further refine search results. For example, searching test -release -in:release-discussion -from:eric returns all results with the term test, excludes posts with the term release, excludes posts made in the release-discussion channel, and excludes messages sent in direct messages by eric.
Use quotation marks " " to return search results for exact terms. For example, searching "Mattermost website" returns messages containing the exact phrase Mattermost website, but doesn't return results containing Mattermost and website as separate terms.
Use the asterisk * symbol at the end of the word to perform a wildcard search. The wildcard search returns all words that begin with the specified letters. The wildcard in search cannot be used at the beginning or in the middle of a word. For example, searching rea* returns messages or files containing words like reach, reason, reality, real, and other words starting with rea. However, searches like *each and re*ch are invalid wildcard searches.
Hashtags are searchable labels for messages. Anyone can create a hashtag in a message by using the pound sign # followed by alphanumeric or other unicode characters. Hashtag examples include: #bug, #marketing, #user_testing, #per.iod, #check-in, #마케팅.
Valid hashtags:
#.To search for messages containing hashtags, select a hashtag in an existing post, or type the hashtag (including the pound # symbol) into the search bar.
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.
From Mattermost v11.6, when your system admin 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.
the, which, and are (known as "stop words"), as well as two-letter and one-letter search terms, are not shown in search results because they typically return too many results. See the Technical notes about searching section below for details.10.100.200.101) don't return results.By default, Mattermost uses full text search support included in PostgreSQL. Select the product menu then select About Mattermost to see which database you’re using.
default_text_search_config value instead of being hardcoded to English. We recommend that Mattermost system admins review this value to ensure it's set correctly.