What makes the search feature on Slack different from the usual web search?
When you search a query on Google, it checks for relevance based on keywords, knowledge graph, geography, but this may not work out for Slack.
Each Slack user has access to limited channels, a unique set of documents and messages. What is relevant to a user at a time changes frequently.
Let's understand with an example. If you're searching for a keyword "requirement", you are most likely looking for your team's requirement about a feature, product, etc. This search result is more relevant than other team's requirements or results with matching keywords.
Slack recognised that user's interaction history with channels and other users, known as work-graph, could benefit relevant search results. After incorporating this with relevant search, it saw a 9% increase in positive clicks and a 27% increase in clicks at the first position.
Next came ranking the results. Since the relevance of a message could change over time, Slack could not rely on techniques that use click performance of results from repeated queries. So, they judged the relative relevance of the search results - If a user clicks the 2nd result instead of the 1st, then there must be something different about it that made it better than the 1st result. So, the 2nd result gets a better feature weight.
Slack used this information along with other signals to train using SparkML’s built-in SVM algorithm. Some of the signals that were useful in training the model were the age of the message, whether the message author is the same as the searcher, the priority score of the searcher’s DM channel with the message author, and aspects of the content of the message, such as word count, presence of line breaks, emoji and formatting.
It is interesting to see how a simple feature like search is not generic across different organisations and is implemented based on the requirement.
Here's a fun fact - Slack is an acronym for "Searchable Log of All Conversation and Knowledge".