mdcpp / mdoj

Mingdao OnlineJudge, A performant contest management system base on cutting edge stack.
https://mdcpp.github.io/mdoj/
5 stars 1 forks source link

Improve tag search on Problem #78

Open Eason0729 opened 3 months ago

Eason0729 commented 3 months ago

The state of art for problem search:

  1. support text search (using %text%): sqlx doesn't support fts5 or tsvector
  2. support tag search (using COUNT(DISTINCT "problem"."id"))
    • automatically add tag on addition
    • Cannot auto-compelete tag or list tag
    • tag would not delete if all problem deleted

periodic tag deletion was chosen because we use read committed isolation level on SQL transcation during tag addition for performance.

TODO: