Skip to content
Snippets Groups Projects
Unverified Commit e85e79c8 authored by Chris Truter's avatar Chris Truter Committed by GitHub
Browse files

Search Index recency ranker to use last-viewed-at (#50071)

parent 4a63f1af
No related branches found
No related tags found
No related merge requests found
......@@ -672,6 +672,7 @@
:database-id false
:last-editor-id :r.user_id
:last-edited-at :r.timestamp
:last-viewed-at true
:pinned [:> [:coalesce :collection_position [:inline 0]] [:inline 0]]
:view-count true
:created-at true
......
......@@ -53,6 +53,7 @@
[:legacy_input :text :not-null]
;; scoring related
[:dashboardcard_count :int]
[:last_viewed_at :timestamp]
[:model_rank :int :not-null]
[:official_collection :boolean]
[:pinned :boolean]
......
......@@ -80,7 +80,7 @@
:view-count (atan-size :view_count search.config/view-count-scaling)
:pinned (truthy :pinned)
:bookmarked bookmark-score-expr
:recency (inverse-duration :model_updated_at [:now] search.config/stale-time-in-days)
:recency (inverse-duration [:coalesce :last_viewed_at :model_updated_at] [:now] search.config/stale-time-in-days)
:dashboard (size :dashboardcard_count search.config/dashboard-count-ceiling)
:model (idx-rank :model_rank (count search.config/all-models))})
......
......@@ -38,6 +38,7 @@
:name
:official-collection
:dashboardcard-count
:last-viewed-at
:pinned
:verified ;; in addition to being a filter, this is also a ranker
:view-count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment