There is a collision problem when enable R::debug(true,2) and there is more than 10 binds params.
The str_replace function replace the first part of slot10 when replace slot1 with the slot1 param.
I've solve this problem by replace slot1 or slot$N by slot1x in all the code.
Lazy fix for slot confusion is debug viewer (mode 2), Close #407.
Better fix than mine, smart use of uksort.
I saw that bug because i used big queries for faceted search. But it seem that it's not the better way to do it from performance view point, i have seen other solutions on internet like Lucene/Solr or Sphinx, but i'm not comfortable with theses and i prefer continue to work with native database for moment.
If somes others in community have any experiences in faceted search (with third party tool or native db), in parallel with RedBean, somes advices will be appreciated.