Periodic Queries: doesn't like full text search
- Dominant language
- Elm
- Stars
- 2.3k
- Forks
- 184
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 4
Description
I added a full text search as the query for a periodic query but now the list will no longer load due to a 500 internal error.
```
2025.03.03 13:10:20:0002 [io-comp...] [ERROR] docspell.restserver.RestServer.httpApp:133 - Processing the request resulted in an error.
java.lang.RuntimeException: Failed to read input near 13:
(& content:""Date";"Amount";"Original amount";"Original currency";"Exchange rate";"Description";"Subject";"Category";"Tags";"Wise";"Spaces"" )
Details: Expected: ) at scala.sys.package$.error(package.scala:27) at docspell.query.ItemQueryParser$.$anonfun$parseUnsafe$1(ItemQueryParser.scala:42)
at scala.util.Either.fold(Either.scala:198) at docspell.query.ItemQueryParser$.parseUnsafe(ItemQueryParser.scala:42) at docspell.restserver.routes.PeriodicQueryRoutes$.$anonfun$taskToSettings$3(PeriodicQueryRoutes.scala:169) at scala.Option.map(Option.scala:242) at docspell.restserver.routes.PeriodicQueryRoutes$.taskToSettings(PeriodicQueryRoutes.scala:169) at docspell.restserver.routes.PeriodicQueryRoutes$$anonfun$apply$1.$anonfun$applyOrElse$1(PeriodicQueryRoutes.scala:44) at fs2.Stream.evalOut$1(Stream.scala:1038)
at fs2.Stream.$anonfun$evalMap$2(Stream.scala:1039) at fs2.Pull$FlatMapR$1.loop$1(Pull.scala:1053)
at fs2.Pull$FlatMapR$1.go$2(Pull.scala:1060) at fs2.Pull$FlatMapR$1.unconsed(Pull.scala:1070)
at fs2.Pull$FlatMapR$1.out(Pull.scala:1079) at fs2.Pull$.$anonfun$compile$24(Pull.scala:1237)
at fs2.Pull$.$anonfun$compile$2(Pull.scala:953) at get @ fs2.internal.Scope.openScope(Scope.scala:275)
at get @ fs2.internal.Scope.openScope(Scope.scala:275) at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163) at flatMap @ fs2.Pull$.fs2$Pull$$interruptGuard$1(Pull.scala:952)
at map @ fs2.internal.InterruptContext.$anonfun$eval$5(InterruptContext.scala:96) at main$ @ docspell.restserver.Main$.main(Main.scala:14)
at as @ docspell.restserver.RestServer$.$anonfun$serve$4(RestServer.scala:75)
2025.03.03 13:10:20:0003 [io-comp...] [INFO ] org.http4s.server.middleware.Logger - HTTP/1.1 GET /api/v1/sec/usertask/periodicquery
```
Contributor guide
Research direction
Reproduce a periodic query using the reported full-text search, then start with ItemQueryParser.scala:42 and PeriodicQueryRoutes.scala:169, following the GET /api/v1/sec/usertask/periodicquery path. The work is done when the periodic-query list loads successfully instead of returning a 500 for this query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100