A simplistic query limit implementation

I'm not entirely sure whether this is the best solution. Especially the `riemann.index/search` change feels wrong. But it shows signs of working, so I'm submitting it for consideration, even if there's quite a bit of work left to do.