Symptom
What determines how search results in SAP Jam calculated/ranked?
Environment
SAP Jam
Reproducing the Issue
When searching in SAP Jam there are normally multiple results.
Resolution
SAP Jam uses Elasticsearch to perform the search function. All the searchable items are indexed in Elasticsearch and then we can search by the related fields like title, text, etc.
There are concepts of "filter" and "query" in Elasticsearch, for a general search request like "Hello world", the "filter" is first used to exclude those items that the currently logged-in user could not access, this is done by checking the user's permission, the item's presence (deleted or not), etc.
Then the "query" is used to find the matched results. There are several kinds of queries used like "phrase_query", "phrase_prefix_query", etc. Some text fields can be searched (title, text, tag...) and by default each text filed has a different field boost so they are viewed in different priorities in ordering by relevancy.
- "title" normally has the highest priority
- then it's the "text" (the "text" is the content text of the searchable item) and "tag"
- last is the "conversation_text" (the "conversation_text" is the comments of the searchable item);
Some items have a unique fields like "first name", "job description" for Member; usually these fields would be combined and indexed/searched in "text" field.
Each returned result has a "_score" which is calculated based on the relevance of the content of the item and the combined search "queries" and the full search results is then ordered by their "_score".
You can find more related info of how the relevance and score are defined in the Elasticsearch documentation- link
Keywords
search criteria, search calculation, searching, algorithm , KBA , LOD-SF-JAM , SAP Jam , Problem