Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
225 lines
14 KiB
Plaintext
225 lines
14 KiB
Plaintext
---
|
||
title: "Search for messages"
|
||
---
|
||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||
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](#hashtags), perform more advanced searches using [search modifiers](#search-modifiers), or adjust search results to show messages from the current team, a specific team, or all teams.
|
||
|
||
## Search for message
|
||
|
||
<Tabs>
|
||
<TabItem value="web-desktop" label="Web/Desktop">
|
||
|
||
1. Select the Search field, select **Messages**, enter your search criteria.
|
||
|
||
> 
|
||
>
|
||
> 
|
||
|
||
2. By default, your search results include messages from all channels within your current team. From Mattermost v10.8, you can select **All Teams** to search all channels across all teams, select a specific team instead, or continue searching within the current team.
|
||
|
||
> 
|
||
>
|
||
> <div class="tip">
|
||
>
|
||
> <div class="title">
|
||
>
|
||
> Tip
|
||
>
|
||
> </div>
|
||
>
|
||
> From Mattermost v10.10, the `from:` search modifier is available for cross-team searches. When searching all teams, you must manually add the `from:` modifier as part of your search criteria to search by specific users across teams.
|
||
>
|
||
> </div>
|
||
|
||
3. When message results display in the Search Results pane, select **Jump** to view a full message in context.
|
||
|
||
> 
|
||
|
||
<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** <img src={useBaseUrl('/img/ui/dock-window_F10AC.svg')} alt="Open thread in a new browser window icon." /> icon in the search results header.
|
||
|
||
</Tip>
|
||
|
||
</TabItem>
|
||
<TabItem value="mobile" label="Mobile">
|
||
|
||
1. Tap the **Search** <img src={useBaseUrl('/img/ui/magnify_F0349.svg')} alt="Search for messages and files in Mattermost." className="theme-icon" /> icon at the bottom of the app to search for messages or files attached to messages.
|
||
|
||
> 
|
||
|
||
2. By default, your search results include messages from all channels within your current team. From mobile v2.28, tap **All Teams** to search all channels across all teams, or select a specific team instead.
|
||
|
||
> 
|
||
|
||
3. Enter your search criteria.
|
||
|
||
> 
|
||
|
||
4. Tap to apply [search modifiers](#search-modifiers) to your search.
|
||
|
||
> 
|
||
>
|
||
> 
|
||
|
||
</TabItem>
|
||
</Tabs>
|
||
|
||
|
||
## Search for files
|
||
|
||
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.
|
||
|
||
- For Mattermost Cloud [workspaces](/end-user-guide/end-user-guide-index), supported document file formats include PDF, PPTX, DOCX, ODT, HTML, and plain text documents. DOC and RTF file formats, as well as the contents of ZIP files, are not supported.
|
||
- For Mattermost self-hosted deployments, supported document file formats include PDF, PPTX, DOCX, ODT, HTML, and plain text documents.
|
||
|
||
<Note>
|
||
|
||
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.
|
||
|
||
</Note>
|
||
|
||
<Note>
|
||
|
||
System admins can extend file content search support for self-hosted deployments to include:
|
||
|
||
- [files shared before upgrading to Mattermost Server v5.35](/administration-guide/manage/mmctl-command-line-tool#mmctl-extract).
|
||
- [DOC and RTF file formats](/administration-guide/configure/environment-configuration-settings#enable-document-search-by-content).
|
||
- [documents within ZIP files](/administration-guide/configure/environment-configuration-settings#enable-searching-content-of-documents-within-zip-files).
|
||
|
||
</Note>
|
||
|
||
### Filter results by file type
|
||
|
||
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.
|
||
|
||

|
||
|
||
### Access recently shared files
|
||
|
||
You can access files recently shared in a channel:
|
||
|
||
<Tabs>
|
||
<TabItem value="web-desktop" label="Web/Desktop">
|
||
|
||
Select the <img src={useBaseUrl('/img/ui/file-text-outline_F09EE.svg')} alt="Use the Channel Files icon to search for files attached to messages in a given channel." className="theme-icon" /> 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** <img src={useBaseUrl('/img/ui/information-outline_F02FD.svg')} alt="Use the Channel Info icon to access additional channel management options." className="theme-icon" /> 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>
|
||
|
||
|
||
## Search modifiers
|
||
|
||
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:`
|
||
|
||
- Use `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.
|
||
- From Mattermost v10.10, you can use `from:` in cross-team searches to find messages from specific users across all teams you're a member of.
|
||
- Use `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:`, `after:`, and `on:`
|
||
|
||
- Use `before:` to find messages or files posted before a specified date.
|
||
|
||
- For example, searching `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.
|
||
|
||
- For example, searching `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.
|
||
|
||
- For example, searching `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.
|
||
|
||
- For example, searching `website on: 2018-09-01` returns messages or files containing the term `website` posted on September 1, 2018.
|
||
|
||

|
||
|
||
### Exclusions
|
||
|
||
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`.
|
||
|
||
### Quotation marks
|
||
|
||
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.
|
||
|
||
### Wildcards
|
||
|
||
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
|
||
|
||
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:
|
||
|
||
- Don't start with a number.
|
||
- Are at least three characters long, excluding the `#`.
|
||
- Are made up of alphanumeric or other unicode characters.
|
||
- May contain dots, dashes, or underscores.
|
||
|
||
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.
|
||
|
||
<Note>
|
||
|
||
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`.
|
||
|
||
</Note>
|
||
|
||
## Search public channels you haven't joined
|
||
|
||
<PlanAvailability slug="ent-plus" />
|
||
|
||
From Mattermost v11.6, when your system admin [enables searching public channels without membership](/administration-guide/configure/environment-configuration-settings#allow-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
|
||
|
||
- Multiple-word searches return results that contain *all* of your search criteria.
|
||
- Search modifiers can help narrow down searches. See the [search modifiers](#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 via **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 `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](#technical-notes-about-searching) section below for details.
|
||
- IP addresses (e.g. `10.100.200.101`) don't return results.
|
||
|
||
## Technical notes about searching
|
||
|
||
By default, Mattermost uses full text search support included in PostgreSQL. Select the **product menu** <img src={useBaseUrl('/img/ui/products_E82F.svg')} alt="Navigate between Channels, collaborative playbooks, and boards using the product menu icon." className="theme-icon" /> then select **About Mattermost** to see which database you’re using.
|
||
|
||
- Stop words are filtered out of search results. See [PostgreSQL](https://www.postgresql.org/docs/10/textsearch-dictionaries.html#TEXTSEARCH-STOPWORDS) database documentation for a full list of applicable stop words.
|
||
- URLs 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.
|
||
- From Mattermost v7.1, search results respect the `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.
|