Hi David,
I'd not even mount a rack app (except if you want to).
Picky is pretty much just POROs, so I'd look at the index or the search very much like model objects. Sinatra is just the thing connecting these to the outside HTTP world.
So the way I'd suggest:
(This depends on how and where you want to search – maybe you call it from the standard Picky interface, maybe you call it from inside another Rails action)
Sorry there isn't a 1-2-3 setup, but I found that such a thing will often move people in the wrong direction, and it takes more time to recognize that and clean it up than to design and think about it before.
One thing: You'd like to change sort order on the fly. Now, in Picky I made the conscious design decision to not include a sorter in the process (time consuming, therefore faster – also, in most cases, developers only need a single sort order). That means the order in which the items are in the index will be the order they are returned as results. That means the order of items per index are fixed. You'd have to have multiple indexes, each with a different sort order, and call them depending on which sort order you want. This is very fast, of course, but the price to pay is space. If you still decide to go ahead with it, don't hesitate to ask the list for help regarding how to do the choosing of the right sort order, ie. index. I suggest just trying it :) Also, remember that you can create the indexes in a nice [:order1, :order2, :order3].each do ... end interation, and don't have to copy paste.
On a positive note: Picky certainly is crazily customizable :)
All the best, hope it serves you well!
Florian