There are two levels of search supported by Mastodon:
The availability of the more advanced full text searching depends on whether your server has implemented additional indexing infrastructure.
By default, Mastodon has limited abilities to allow searching of hashtags and to display recent posts made with that tag, using data stored in the primary PostgreSQL database. Including a hashtag in your post can make that post discoverable by anyone else who might click on the hashtag in the interface.

Anything that is posted with a hashtag may be found by local users or federated other servers and discoverable by searching for that hashtag.

If an administrator chooses to implement it, Mastodon can integrate with Elasticsearch or OpenSearch to provide the ability to do additional searching on:

How will I know if full text searching is enabled?
When you start searching, the dropdown will say "Posts matching ..." your term. If you don't see this, full text searching is not enabled.

Starting in Mastodon 4.2, full text search will also include posts for anyone who opts-in to letting their own server, and other Mastodon servers, return any full text search results for their posts.

This opt-in process can be done in Preferences > Privacy & Reach under "Include posts in search results."
Like any other profile update, the changes are queued to immediately be sent to other servers but for any number of reasons may fail to be received by all servers.
Mastodon does additional polling of remote user profiles to make sure the indexable flag and other profile data is up-to-date.
If you have opted your account into full indexing, but wish to not have an individual post discoverable, you can opt that post out by setting the post visibility to "Unlisted" instead of public.
Follower only and private mentions are also not discoverable to other users.
Users can also opt-out of their profile biographical information being returned in search results, by visiting the Preferences > Privacy & Reach under "Feature profile and posts in discovery algorithms."

Changing this setting is not recommended.
The discoverable and indexable settings are federated to other Mastodon servers running version 4.2 beta 2 or higher, as well as other Fediverse software platforms that recognize this flag.
However, some servers may side-step some of the privacy concerns and implement an different full text search method which does not respect this indexable flag, while other Fediverse projects and forks have done so in their own ways.
vmst.io has limited controls over how other federated platforms index your posts.
The following search modifiers are available on vmst.io, and other servers Mastodon 4.2 or higher:
| Operator | Modifies search to |
|---|---|
from:me | Posts you've made |
in:library | Posts you have previously interacted with (favorite/boost) |
from:username | Posts from a specific user |
has:image | Posts that include an image |
has:video | Posts that include a video |
has:audio | Posts that include audio |
has:media | Posts that include any media |
has:poll | Posts that have a poll |
has:link | Posts that have a link |
has:embed | Posts that have embedded content |
As this feature is further developed, more modifiers may become available.
- operator as part of the search. For example, -has:media would exclude any post that includes media attachments.AND between each component.OR type operator.'Search Term' or "Search Term"Star Wars will return posts that contain both the word Star and Wars but not necessarily Star Wars.'Star Wars' or "Star Wars" will only return posts that contain the exact combonation.John Mastodon AND include an image posted before August 1, 2023, use the following search: 'John Mastodon' has:image before:2023-08-01from:me before:2024 has:link'Star Trek' has:image -SNWfrom:vmstan -is:reply coffeeRelays
Relays allow all content from participating servers to be directly federated to everyone else, without waiting for a direct user connection to be established. This helps with content discovery and more to complete conversation threads and hashtags for our users.
Source
The majority of Mastodon servers are running the standard "tagged" releases from the Mastodon project, but we do things a little differently here.