OK, now I understand what you're trying to accomplish. Unfortunately, I haven't a clue about any better solution than you're already using. I've also seen the optimize step take a really long time.....
Does it make any sense at all to write a bunch of separate indexes (a new one each time you would flush your RAMdir) and then use a MultiSearcher on them? Perhaps with some offline merger/optimizer that ran periodically so you don't end up with a bazillion indexes? It adds ugly complexity to managing your indexes, but... Best Erick