Search Effectively

Because Slack works quite a bit like a message-based social network or instant messaging system, important information often scrolls off the top of the screen quickly in active conversations.

Finding that information later has a high value, and this short chapter covers some important ground by detailing how to get the most out of Slack’s Search feature. Unlike a typical search engine, Slack provides context around search results, making it easy to see the portion of the discussion in which they occur.

Compose Queries

Every Slack app has a search option in the messaging view, whether it appears as a full Search field or a Search button you tap (in the mobile apps). You can type /s in the Message field.

Query Any Terms

Slack lets you type freeform queries. For instance, if you search on apple, the app sends a query to its central store of your workspace’s messages and brings up every message and uploaded or directly linked file that contains apple—but only from conversations to which you have access, which can include all public channels.

You can enter more specific search terms to refine your search. This is useful when you’re looking for something particular or when you get too many matches from a general search query—or not enough.

You can start by restricting matches to phrases by putting a set of words in quotation marks, like "iPhone malware".

To make a broader match, try wildcard matching by adding an asterisk (*) at the end of a full or partial word. The word stub has to have at least three letters before the asterisk. For instance, if you want to find detail, detailed, details, and detailing, you could search on detail*.

Work Around Slack’s Search Oddities

When I was writing the 1.0 version of this book, I kept finding odd results. Searching for iphone (all lowercase), iPhone (intercap P), and iPhOnE (mixed case) produced different totals for matches—sometimes including results that didn’t seem to have the word at all!

I contacted Slack technical support, and the representative queried Slack engineers. Instead of as in most search engines, Slack treats intercaps (like the P in iPhone) as a kind of word separator: each intercap starts a new “sub word.” So iPhone matches iphone (any capitalization) and phone but not I by itself.

Here’s how this matches up for several different searches on ostensibly the same word and how this worked on the TidBITS Slack workspace:

  • iphone (all lowercase) and IPHONE (all uppercase): All instances of iphone are matched, no matter the capitalization: iphone, iPhone, and iPHoNe would all be matched. (258 results)

  • iPhone (intercap P): All instances of iPhone are matched exactly as well as the words iphone and phone (any capitalization). The word I was not matched in any form, except and only if it occurred on the same paragraph as phone or iphone. (315 results)

  • iPhOnE (weird caps): iPhone was matched in every form, and on and one also matched if in the same paragraph. Phone by itself was not matched. (225 results)

  • i phone (space between): Matches phone, iPhone, and I (as well as I’ve and other contractions). (950 results)

The moral of this story is that you should use all-lowercase searches to sweep in the matches you most likely want.

Examine Results

In Figure 96, I’ve searched on report in the this workspace using a web app. The results are sorted into Messages, Files, Channels, and People in desktop and web apps. (On the right is a “Filter by” section that I’ll get into later.) With mobile apps, you see just Messages and Files; Android additionally shows the number of matches in parentheses following the category heads.

Figure 96: Desktop and web search results show matches with keywords highlighted as well as a filter pane for refining. My team is a little report obsessed!
Figure 96: Desktop and web search results show matches with keywords highlighted as well as a filter pane for refining. My team is a little report obsessed!

Use the headings at the top of the search results to switch among categories. Messages includes only regular messages, while Files includes any snippet or post, text in any file that’s been uploaded, and any linked files from cloud services, like Dropbox and Google Drive, and other apps.

Channels matches titles and descriptions for any public channel as well as any private channel you’re part of. People match against any member’s profile, including email address and other details, from the set of all members visible to you.

Message results are grouped by default from newest to oldest, and files, channels, and people by most relevant, defined by Slack’s own algorithms for what makes the best match. You can change sorting in many cases:

  • Messages and files (desktop, web, iOS, iPadOS): You can switch between “Most recent” (“Newest messages” and “Newest files” in iOS and iPadOS) and “Most relevant.” Each entry in Messages shows the conversation name and date above the message, followed by the message as it appears in a conversation.

  • Channels (desktop, web): Select among “Most relevant,” “Date created (newest to oldest),” “Name (A to Z),” and “Members (most to least).” This is surely useful only in workspaces with a whole lot of channels.

  • People (desktop, web): The alternative to “Most relevant” is simply alphabetical.

For each kind of result, you can click or tap it to view it in context. Messages appear in the main timeline or in a thread and files show up in the Files sidebar in web and desktop apps and in a viewer in mobile apps.

Clicking a channel switches to it, while clicking a person opens their profile in the Workspace Directory on Slack’s right-hand side.

People additionally have a Message button you can click when hovering open. If they’ve ever used the keywords you searched on for them, you also see a link below their entry in the search results that says “Talks about ‘keywords,’” which you can click to perform a Messages search restricted to those keywords and that person.

Filter Searches

If you want to further nail down a search, you can limit it to a date range, channel or person, or a message property. All this makes it easier to pinpoint what you’re looking for.

In desktop and web apps, a “Filter by” section appears to the right of search results that lets you apply items and select a limited number of elements.

However, you also can type search limiters directly in the Search field, which is the only way to add these in mobile apps (except for some prefab items that appear in a “Search modifiers” list).

Enter these words in a desktop or web app, and Slack offers autocomplete suggestions.

Search by Date

Slack lets you limit results by date with a lot of options. In desktop and web apps, you can use a calendar-based date selector by clicking Starting and Ending in the Date section of the filter sidebar.

You can also use a whole bunch of different words in the search field: before: and after: to set limits, on: or during: to define an entire period (like a day or month), and explicitly yesterday and today, as well as week, month, or year to refer to the most recent week, month, or year. So you can see before:month (meaning the previous month) or after:yesterday (if you’re a Paul Giamatti fan). These terms are converted into entries for the Starting and Ending date selectors.

As an example, you might want to find messages between June 1 and June 30, 2018. You could express this in at least three ways:

  • before:07/01/2018 after:05/31/2018

  • after:2018-05-31 before:2018-07-01

  • If June 2018 is the most recent June for which you’re looking—you’re performing a search before June 2019, that is—you can also just typeduring:june

Of course, you can combine any of these with additional search terms, so to find messages in the month of June containing the word iPhone, you’d search on: iPhone during:june

Search by People or Conversation

Narrowing a search to one or more people or one or more conversations often provides more useful results. In the desktop and web apps’ “Filter by” section, you can check entries that appear or click More, then filter and add more people or conversations.

With text limiters, enter in: followed by a channel name, like in:#pets-cats, or a person’s name, like in:Joe Philpott,Adam Westcoat, which matches within a group DM with those people (Figure 97). A special synonym to find your messages? Use in:me. For DMs sent to you? Enter to:me.

Figure 97: You can limit results to a specific person by specifying from: and their handle. Here, I further restricted to a month.
Figure 97: You can limit results to a specific person by specifying from: and their handle. Here, I further restricted to a month.

Combining a channel and a person in one query finds even more precise matches, such as when someone offers a particular insight. For instance, in:#random in:michael lets me see all the bon mots from my colleague Michael Cohen.

Search by Star, Link, or Emoji

To only find messages you’ve starred, use has:star. You can also restrict messages to those that contain a link (any link) with has:link, pinned messages with has:pin, and to specific emoji by using has: followed by the Slack emoji name in the usual format with colons on either side, like has::robot_face: . You can’t use autocomplete in this one case; you’ll have to look up the emoji name in order to enter it.

I might type in:mac-news from:tonya has:link to get a summary of all links that Tonya has posted in the mac-news channel.

Limit Search Scope

One final filter desktop and web app filter lets you choose to include or exclude results from apps and bots with one checkbox and “Only search my channels” with another. That channels option excludes public channels that you haven’t joined; private channels are only included if you’re a member already.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.248.208