Use the Mattermost Search field to find messages, replies, and the contents of files shared across all channels you’re a member of in your team’s conversation history. File content search is available now in Mattermost Cloud, and in Mattermost Server from v5.35, with mobile support coming soon.
You can also do more advanced search using search modifiers.
Searching for Message Contents¶
Select the Search field, then type your search criteria.
When message results display in the Search Results pane, select Jump to view the full message in context.
Message results return first automatically if a message search isn’t specified. In the Search Results pane, select Messages or Files to switch between results.
Searching for File Contents¶
Select the Search field, select Files, then type your search criteria.
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.
For Mattermost Cloud workspaces, supported document file formats include PDF, DOCX, PPTX, ODT, HTML, and plain text documents. RTF and PAGES file formats, as well as the contents of ZIP files, are not supported.
For Mattermost Server deployments, supported document file formats include PDF, PPTX, ODT, HTML, and plain text documents.
System Admins can extend file content search support to include:
To narrow search results further, in the Search Results pane, select the File Type Filter option, then select specific file types, such as documents, spreadsheets, or images.
Select the Channel Files icon below the channel name to access files recently shared in that channel.
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.
from: to find messages or files from specific users.
For example, searching
from:john.smith only returns content from your Direct Message history with John Smith.
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.
For example, searching
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: to find messages or files posted before a specified date.
after: to find messages or files posted after a specified date.
after: together to search in a specified date range.
on: to find messages files posted on a specific date. Use the date picker to select a date, or type it in YYYY-MM-DD format.
website before: 2018-09-01returns messages or files containing the term
websiteposted prior to September 1, 2018.
website after: 2018-08-01returns messages or files containing the term
websiteposted after August 1, 2018.
website before: 2018-09-01 after: 2018-08-01returns all messages or files containing the term
websiteposted between August 1, 2018 and September 1, 2018.
website on: 2018-09-01returns messages or files containing the term
websiteposted 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
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
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
website as separate terms.
Use the asterisk
* symbol for wildcard searches that match within words. For example, searching
rea* returns messages or files containing
real, and other words starting with
Notes About All Searches¶
Multiple-word searches return results that contain all of your search criteria.
Search modifiers can help narrow down searches. See the Search Modifiers section for details.
You can search Archived channels as long as you’re a member of that channel.
If you’re unable to see messages or files in archived channels in your search results, ask your System Admin if Allow users to view archived channels has been disabled under System Console > Site Configuration > Users and Teams.
To remove archived channels from your search results, you can leave the Archived channels.
Like many search engines, common words such as
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 section for details.
IP addresses (e.g.
10.100.200.101) don’t return results.
Searching Chinese, Korean, and Japanese¶
The best experience for searching in Chinese, Korean, and Japanese is to use MySQL 5.7.6 or later with special configuration. See the Chinese, Japanese and Korean Search documentation for details.
You can perform searches without this configuration by adding wildcards
*to the end of search terms.
Differences between PostgreSQL and MySQL search¶
By default, Mattermost uses full text search support included in MySQL and PostgreSQL. These databases have slightly different search behavior. Check Main Menu > About Mattermost to see which database you’re using.
Other database-specific differences include:
Email addresses don’t return results.
Hashtags or recent mentions of usernames containing a dash don’t return results.
Terms containing a dash return incorrect results since dashes are ignored in the search engine.
Hashtags or recent mentions of usernames containing a dot don’t return results.
Stop words that are excluded from search in MySQL include:
"a", "about", "an", "are", "as", "at", "be", "by", "com", "de", "en", "for", "from", "how", "i", "in", "is", "it", "la", "of", "on", "or", "that", "the", "this", "to", "was", "what", "when", "where", "who", "will", "with", "und", "the", "www".