folded-ear / gobrennas-api

HTTP API for gobrennas.com
https://gobrennas.com
MIT License
1 stars 0 forks source link

Fulltext recipe indexing #3

Closed barneyb closed 1 year ago

barneyb commented 1 year ago

Create a Postgres fulltext index for recipe search, but don't actually use it (yet). Several not-quite-orthogonal concerns:

  1. create a tsvector (fulltext search document) of "recipe text" per recipe
  2. index that column (w/ owner info)
  3. ensure recipes' fulltext documents are kept current as recipes, ingredients, and labels change
  4. remove a number of no-longer-used search codepaths
  5. dodge H2's use in tests, where it can't cope with the Postgres-specific syntax
  6. expose some stats about the index state
barneyb commented 1 year ago

Because of initial indexing time, this is going to roll out in two phases: building the index and using the index for search. So this guy's toast, in favor of two sequential PRs to com.