diff --git a/pkg/models/typesense.go b/pkg/models/typesense.go index b876ff9cc..d8934c608 100644 --- a/pkg/models/typesense.go +++ b/pkg/models/typesense.go @@ -146,22 +146,10 @@ func CreateTypesenseCollections() error { Name: "updated", Type: "int64", // unix timestamp }, - { - Name: "bucket_id", - Type: "int64", - }, - { - Name: "position", - Type: "float", - }, { Name: "created_by_id", Type: "int64", }, - { - Name: "project_view_id", - Type: "int64", - }, { Name: "reminders", Type: "object[]", // TODO @@ -192,6 +180,10 @@ func CreateTypesenseCollections() error { Type: "object[]", // TODO Optional: pointer.True(), }, + { + Name: "positions", + Type: "object", + }, }, } @@ -386,6 +378,12 @@ func indexDummyTask() (err error) { }, }, }, + Positions: map[string]float64{ + "view_1": 10, + "view_2": 30, + "view_3": 5450, + "view_4": 42, + }, } _, err = typesenseClient.Collection("tasks"). @@ -461,6 +459,7 @@ func convertTaskToTypesenseTask(task *Task, positions []*TaskPosition) *typesens Labels: task.Labels, //RelatedTasks: task.RelatedTasks, Attachments: task.Attachments, + Positions: make(map[string]float64, len(positions)), } if task.DoneAt.IsZero() {