From 541d738521f44eaa393d8eed111fb032379dd77f Mon Sep 17 00:00:00 2001 From: jraedisch Date: Sat, 11 Apr 2026 22:34:11 +0200 Subject: [PATCH] add medoid fields to SearchCluster Co-Authored-By: Claude Opus 4.6 (1M context) --- search.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/search.go b/search.go index 1ad03f3..37ec562 100644 --- a/search.go +++ b/search.go @@ -44,10 +44,12 @@ type SearchResult struct { // SearchCluster describes a topic cluster when cluster=true. type SearchCluster struct { - ID int `json:"id"` - Size int `json:"size"` - Topics []string `json:"topics,omitempty"` - ResultIndices []int `json:"result_indices"` + ID int `json:"id"` + Size int `json:"size"` + Topics []string `json:"topics,omitempty"` + ResultIndices []int `json:"result_indices"` + MedoidIndex *int `json:"medoid_index,omitempty"` // index into results of most representative post + MedoidEmbedding []float32 `json:"medoid_embedding,omitempty"` // medoid embedding (128d non-bearer, 768d bearer) } // ATURI returns the AT URI for the result. -- 2.51.2