Open mlissner opened 7 years ago
I've continued researching this today and there's some good news. Looks like this was added to Sunburnt towards the end of last year. Would a PR to merge this in be welcome? It's a slim and tidy little patch:
https://github.com/tow/sunburnt/pull/80
Basically, it makes it so you can do:
si.add_extras({'some': 'stuff'})
And it will simply be added to your normal chainable query.
Sorry to keep sending messages today. Here's a gist providing the extended classes, in case other people want to just use them:
https://gist.github.com/mlissner/d1e32a5572932665c15541fdb2e2c7af
I'm not sure if there's an appetite for this, but I find it enormously useful to be able to send arbitrary parameters to Solr outside of what the API typically allows (i.e., low-level queries like what pysolr provides).
I have a function I hacked on top of sunburnt that allows me to do raw queries. For example, I can do this:
And that'll make a Solr request like:
The main way I use this is to add a
caller
parameter to every request I make so that I can keep track of which ones are slow or later sort things out in the logs, but I also use it whensunburnt
or lacks a parameter I need.Any appetite for adding this into core? I can provide a PR if so.