Wildbook icon indicating copy to clipboard operation
Wildbook copied to clipboard

Improve handling of stored queries

Open naknomum opened this issue 1 year ago • 1 comments

Context

currently "stored queries" (as used by our OpenSearch functionality) are stored very simply as json on the filesystem. this is functional, but will accumulate over time and needs better architecture.

Requirements

The current proposed solution:

  • move to a proper java class that is persisted in the database instead
  • have a creation timestamp, to allow removal of queries that are "old enough" to be expired/deleted
  • all proposed properties: id, created, indexName, creator, query (mirrors current file-based queries)
  • background process to remove expired queries

Technical note

this also allows for possible later development of user-ownership and "named" queries for more permanent storage

naknomum avatar Sep 23 '24 21:09 naknomum

@naknomum What could go wrong if these stored queries build up on disk? What's the advantage to having them in Java?

holmbergius avatar Feb 03 '25 20:02 holmbergius