corpus-db
corpus-db copied to clipboard
Max results query parametr
Would be nice to have a query parameter that can return x number of results to speed up examples in the notebook.
Good idea. Yeah /api/subjects
takes forever, and I don't know how to do profiling in Haskell, yet. I was thinking of caching stuff like that, since it's always going to be the same (for the moment, at least).
Caching sounds like a good idea. Can you support query parameters yet? You'll need them to do stuff likein the fancy SQL queries you showed off in your presentation.
Scotty has a parameter parser built-in, I'm pretty sure. The tutorial here says to do something like this:
get "/hello" $ do
name <- param "name"
text name
Which I imagine handles a URL like /hello?name="Jonathan"
, although I haven't tested it.