)]}'
{
  "commit": "08d779632c484fc7716320dcda30ef919424effe",
  "tree": "42d60ad651887f4fbbda2750ab78e119fed1502b",
  "parents": [
    "f11d96b6961f59bfc291c3fb9751dd7a4b935ff9"
  ],
  "author": {
    "name": "Ethan Lee",
    "email": "ethanalee@google.com",
    "time": "Thu Aug 13 20:06:46 2026 +0000"
  },
  "committer": {
    "name": "Gopher Robot",
    "email": "gobot@golang.org",
    "time": "Tue Aug 25 12:08:44 2026 -0700"
  },
  "message": "internal/postgres: improve vector search quality\n\nIncorporate package popularity directly into the vector candidate\nranking CTE before computing the Reciprocal Rank Fusion to prevent\nlow-import package from diluting well-known packages.\n\nPreviously, vector search ranked candidates exclusively by semantic distance. This allowed low-quality or obscure packages to dominate the top vector results, pushing popular packages out of the aggregation window.\n\nThere is now this approach: 1. Fetch the top N nearest neighbors for the query using the index. 2. Rerank the candidates using a combined score that accounts for cosine similarity and popularity.\n\nThis ensures that the vector rank (rank_vec) provided better reflects package quality.\n\nChange-Id: I1a5861bb5ba8268bf0c10fb129a2e0a3d7a8980b\nReviewed-on: https://go-review.googlesource.com/c/pkgsite/+/815060\nkokoro-CI: kokoro \u003cnoreply+kokoro@google.com\u003e\nAuto-Submit: Ethan Lee \u003cethanalee@google.com\u003e\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Jonathan Amsterdam \u003cjba@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "56e0d0309ac19c2847e0d24cc42d099a2330abb4",
      "old_mode": 33188,
      "old_path": "internal/postgres/search.go",
      "new_id": "6807d4e0835e755c509b03360e553f127d243fb2",
      "new_mode": 33188,
      "new_path": "internal/postgres/search.go"
    },
    {
      "type": "modify",
      "old_id": "d0467cf9378304630a4337223ad693c7488fc49a",
      "old_mode": 33188,
      "old_path": "internal/postgres/search_test.go",
      "new_id": "6a75610f5f0f864792e1995a0fde75006c42d614",
      "new_mode": 33188,
      "new_path": "internal/postgres/search_test.go"
    }
  ]
}
