From d93e98f76b43fe8c0e44024985d3d7cb20dc12a1 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 19 Jun 2026 23:14:51 +0200 Subject: [PATCH] fix(search): qualify the task index column to avoid ambiguity with the parent-task join --- pkg/models/task_search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/models/task_search.go b/pkg/models/task_search.go index f3e137d84..a8884ba7f 100644 --- a/pkg/models/task_search.go +++ b/pkg/models/task_search.go @@ -332,7 +332,7 @@ func (d *dbTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task, totalCo searchIndex = getTaskIndexFromSearchString(opts.search) if searchIndex > 0 { - where = builder.Or(where, builder.Eq{"`index`": searchIndex}) + where = builder.Or(where, builder.Eq{"tasks.`index`": searchIndex}) } } @@ -469,7 +469,7 @@ func (d *dbTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task, totalCo // can only score a pure-ParadeDB query, so a `||| ... OR index = N` group is // an unsupported query shape on ParadeDB. Run two supported arms instead and // rank exact index matches first, then text matches by relevance. - indexTasks, err := fetchTasks(rankCondWith(builder.Eq{"`index`": searchIndex}), distinct, orderby, false) + indexTasks, err := fetchTasks(rankCondWith(builder.Eq{"tasks.`index`": searchIndex}), distinct, orderby, false) if err != nil { return nil, 0, err }