Logging of search queries and clicks
Logging which search queries are executed, as well as which results are clicked on by a user, is strongly recommended for two reasons:
- The algorithm can learn from a user's search behaviour and refine the user's know-how profile.
- KPI statistics about the number of searches provide an important indicator for how a network is performing.
Logging search clicks
POST /search/log/:questionId/click
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
search_query_id |
integer |
- | ✓ | The id that was returned when logging the search query. |
rank |
integer |
- | ✓ | The position of the clicked question in the search results. |
Json Payload
{
"search_query_id": "2",
"rank": 3
}
Create a log entry when a user clicks on one of the results after using the question search. The search query that was used needs to be logged beforehand, which creates a search query id that must be used as a parameter to this request.
The rank of the question that was clicked on within the search results must also be logged, which makes a more detailed analysis of the search behaviour of users possible.
Logging similar question clicks
POST /search/log/:questionId/similar-question-click
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
title |
string |
- | ✗ | The title that was used to obtain the similar questions. |
description |
string |
- | ✗ | The description that was used to obtain the similar questions. |
rank |
integer |
- | ✗ | Optionally, the position of the clicked question in the similar question results. |
Create a log entry when a user clicks on one of the results after using the similar question search while writing a new question. The values of the title and description input fields that were used to obtain the similar questions, can be provided as a reference.
Optionally, the rank of the question that was clicked on within the similar questions can also be logged, which makes a more detailed analysis of the search behaviour of users possible.