Typesense - Only Works if I re-index

Hello,

I have installed 0.23.0 with Helm on a K8s Cluster.

Everything seems to be working fine and I can search tasks by name however Label search seems is not getting updated.

For example say that I create a new Task, Task-1 and Label it with a pre-existing label, Lable-1.
If I now search for “Label-1” Task-1 is not listed.
There are no errors in the logs.

If I connect to the API POD and run ./vikunja index it works but I have to do this every time I add a new Task.

I tried partial-reindex as well and that breaks Typesense and the API POD will show this error {"message": "Could not find a field named comments.comment in the schema."}

I am using Typesense 0.26.0.rc67 is not clear from the installation guide if there is any specific version dependency.

Thank you!

Does the search for the updated label work when you add some detail on the task, after updating the label?

Hi,

Indeed, I added a description and then it indeed popped up in the search by Label!

So it seems that creating a new Task + Label doesn’t trigger indexing or something on these lines.

Should be fixed with 521300613f. Please check with the next unstable build (make a backup first!) in ~45min or the next regular release.

Hi!
I just tested the image but seems is crashing for me every time I add something with out without labels:

2024-04-07T09:40:15.666677125Z: ERROR   ▶ events/func1 602 Error while handling message 8a8b73fb-339e-4528-90b1-cfded128db80, handler_poisoned=task.created.typesense.task.add, subscriber_poisoned=gochannel.GoChannel, reason_poisoned=panic occurred: "assignment to entry in nil map", stacktrace:
goroutine 1004 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x64
github.com/ThreeDotsLabs/watermill/message/router/middleware.Recoverer.func1.1()
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router/middleware/recoverer.go:29 +0x50
panic({0x14a7160?, 0x3c2e7d0?})
        /usr/local/go/src/runtime/panic.go:914 +0x218
code.vikunja.io/api/pkg/models.convertTaskToTypesenseTask(0x4000a5ca00, {0x4000381380, 0x4, 0x0?})
        /go/src/code.vikunja.io/api/pkg/models/typesense.go:480 +0x83c
code.vikunja.io/api/pkg/models.getTypesenseTaskForTask(0x4000d9f450, 0x4000a5ca00, 0x0)
        /go/src/code.vikunja.io/api/pkg/models/typesense.go:258 +0xf8
code.vikunja.io/api/pkg/models.(*AddTaskToTypesense).Handle(0xffffffffffffffff?, 0x4025eabce0)
        /go/src/code.vikunja.io/api/pkg/models/listeners.go:532 +0x150
github.com/ThreeDotsLabs/watermill/message.(*Router).AddNoPublisherHandler.func1(0x400090e4e0?)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router.go:334 +0x24
github.com/ThreeDotsLabs/watermill/message/router/middleware.Recoverer.func1(0x4000957d40?)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router/middleware/recoverer.go:33 +0x74
github.com/ThreeDotsLabs/watermill/message/router/middleware.Retry.Middleware-fm.Retry.Middleware.func1(0x40009ddb00?)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router/middleware/retry.go:72 +0x1c8
github.com/ThreeDotsLabs/watermill/message/router/middleware.poisonQueue.Middleware-fm.poisonQueue.Middleware.func1(0x14c17a0?)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router/middleware/poison.go:99 +0x90
github.com/ThreeDotsLabs/watermill/components/metrics.HandlerPrometheusMetricsMiddleware.Middleware-fm.HandlerPrometheusMetricsMiddleware.Middleware.func1(0x400078a000?)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/components/metrics/handler.go:58 +0x13c
github.com/ThreeDotsLabs/watermill/message.(*handler).handleMessage(0x40006884e0, 0x4025eabce0, 0x4000798ac8)
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router.go:775 +0x13c
created by github.com/ThreeDotsLabs/watermill/message.(*handler).run in goroutine 137
        /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.3.5/message/router.go:620 +0x26c
, topic_poisoned=task.created,  payload={"task":{"id":44,"title":"HomeSte","description":"","done":false,"done_at":"0001-01-01T00:00:00Z","due_date":"0001-01-01T00:00:00Z","reminders":null,"project_id":1,"repeat_after":0,"repeat_mode":0,"priority":0,"start_date":"0001-01-01T00:00:00Z","end_date":"0001-01-01T00:00:00Z","assignees":[],"labels":[],"hex_color":"","percent_done":0,"identifier":"#19","index":19,"related_tasks":{},"attachments":[],"cover_image_attachment_id":0,"is_favorite":false,"created":"2024-04-07T09:40:11.384061432Z","updated":"2024-04-07T09:40:11.384083892Z","bucket_id":0,"position":0,"reactions":{},"created_by":{"id":1,"name":"Camillo","username":"akadmin","created":"2024-03-28T12:03:14Z","updated":"2024-04-07T09:04:07Z"}},"doer":{"id":1,"name":"Camillo","username":"akadmin","created":"2024-03-28T12:03:14Z","updated":"2024-04-07T09:04:07Z"}}

I’ve just pushed a bunch of fixes for the typesense integration (cb648e5ad8, 3519b8b2fe, a5d02380a3, 77e95642a9) which should fix the problem and make this work correctly with the recent change of views. Please check with the next unstable build (ready in ~45min).

Please do a full reindex with the vikunja index cli command as well, I haven’t tested it otherwise.