This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content

Thumbs Up should be considered for relevance in elastic search

Each Exercise/Collection can earn thumbs up.

A search query should rank results of a query according to its "Thumbs up". A sorting of the query according a "thumbs up" from the database is not efficient, because we would need to load all results from elastic search, join them with the "thumbs up" feature, and sort them. This counterfeits paging by elastic search.

Possible implementation:

  1. The meta data in elastic search should also contain a field "thumbs up".
  2. The number of "thumbs up" should be transfered on a regular base (every night?) from the database, to the meta data index. Alternatively we could update the elastic search meta data every time a thumbs-up event occurs and perhaps use a webhook on elastic search (https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-webhook.html) in order to update thumbs up regularily.
  3. An elastic search query should use the thumbs up feature, in order to sort by relevance including thumbs-up counter