Mattermost, Inc.

Preview: Search Modifiers

  1. Support from: and in: search modifiers
  • If from:USERNAME appears in search query separated by either spaces or commas from search terms, return results filtering for messages and comments from USERNAME
    • Example: “Gitlab from:ian” or “Gitlab, from:ian” or “from:ian, Gitlab”
  1. If in:CHANNEL_HANDLE appears in search query separated by either spaces or commas from search terms, return results filtering for messages and comments in channel CHANNEL_HANDLE
    CHANNEL_HANDLE can be a channel, private group, or private message.
    Example: “Gitlab in:town-square” or “Gitlab, in:town-square” or “in:town-square, Gitlab”

  2. Multiple modifiers should be processed as INCLUSIVE OR

    • Example: “from:ian, from:corey, in:town-square, ham” should find all messages or comments from ian or corey containing words starting with “ham”*
  3. Spaces around “:” should break search modifiers, e.g. “from:james” is a search modifier “from: james” is not a search modifier, it’s searching for terms “from:” and “james”

  4. Offer auto-complete after “from:” with list of usernames in a pop-up list identical to @mentions list

  5. Offer auto-complete after “in:” with a list of channels, private groups, and private messages similar to @mentions list but populated with channel, PM, and private group handles

  • Add icons in list to make it clear which are channels, private groups and private messages
  1. Show a pop-up with help text as soon as an user clicks into the search box
  • Help text should read: “Use from:[username] to find posts from specific users and in:[channel_url_name] to find posts in specific channels, PMs, and private groups”
  • Pop-up should only appear when the user initially clicks into an empty search bar - it should disappear as soon as the user starts to type.

This section is a bit confusing to me. Does the inclusive-or apply to all modifiers, or only multiple modifiers of the same class, where separate classes of modifier are treated as an AND? i.e. in the example given, would that in fact find messages (from ian OR from corey) AND (in town-square) AND (match ham)?

It would also be nice if this explicitly accepted the slugs, e.g. from:@ian was just as valid as from:ian.

Having a date modifier would be really great too, though mapping date (& date range!) syntax to modifiers may be difficult, if it’s expected that spaces break parsing (e.g. ‘date:aug 9 2015’ feels more natural than ‘date:20150809’; using ‘date:2015-08-09’ brings the DDMM/MMDD issue to the fore, and also the hyphens-as-separators make it more difficult to implement ranges - ‘date:2015-08-09-2015-08-13’ looks a bit odd, and ‘date:2015-08-09,2015-08-13’ is a list of two dates, not a range of five dates).

I like the discussion about Search Modifiers and I see them as benefit for making search effective. I created a few days ago a new Forum topic (see Extended quick search key with search expressions) as I was not aware of this entry. Feel free to give your feedback.