zot icon indicating copy to clipboard operation
zot copied to clipboard

Freeform search API: include user specific metadata

Open andaaron opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. A freeform search API was introduced in https://github.com/project-zot/zot/issues/591 / https://github.com/project-zot/zot/pull/618 This API should include user specific information as part of search results.

Note currently we do not store this data, we need an enhancement as part of https://github.com/project-zot/zot/issues/592

Describe the solution you'd like This API should include user specific information as part of search results:

  • StarCount for images - number of users which have starred the image
  • StarCount for repos - number of users which have starred the repo
  • IsBookmarked for image - true if current user has bookmarked his image
  • IsBookmarked for repo - true if current user has bookmarked his repo
  • The image/repo "relevance"/"score" should take into account if the user has starred/bookmarked the specific image/repo. Bookmarks having the highest score, if they martially match the search string, followed by starred repos if they partially matched the search string.

Additional context This is needed for the zui functionality - in both the general search view with results as cards.

andaaron avatar Jul 20 '22 17:07 andaaron

We could split this issue if it is too large for a single PR.

andaaron avatar Jul 20 '22 17:07 andaaron

For the current design goal of zui, starring/bookmarking individual images is not something we want to support, only starring/bookmarking a repo. This might change in future iterations of the zui design.

raulkele avatar Jul 21 '22 11:07 raulkele

Note the new fields for repos were added in: https://github.com/project-zot/zot/pull/1317 The new fields for images are no longer needed.

The ranking updates (score is obsolete and replaced by rank) are still on the table.

andaaron avatar Apr 25 '23 07:04 andaaron