public static MultiSearcher wrapSearcher(final Searcher s, final int edge) 
    throws IOException {

    // we can't put deleted docs before the nested reader, because
    // it will through off the docIds
    Searcher[] searchers = new Searcher[] {
      edge < 0 ? s : new IndexSearcher(makeEmptyIndex(0), true),
      new MultiSearcher(new Searcher[] {
        new IndexSearcher(makeEmptyIndex(edge < 0 ? 65 : 0), true),
        new IndexSearcher(makeEmptyIndex(0), true),
        0 == edge ? s : new IndexSearcher(makeEmptyIndex(0), true)
      }),
      new IndexSearcher(makeEmptyIndex(0 < edge ? 0 : 3), true),
      new IndexSearcher(makeEmptyIndex(0), true),
      new MultiSearcher(new Searcher[] {
        new IndexSearcher(makeEmptyIndex(0 < edge ? 0 : 5), true),
        new IndexSearcher(makeEmptyIndex(0), true),
        0 < edge ? s : new IndexSearcher(makeEmptyIndex(0), true)
      })
    };
    MultiSearcher out = new MultiSearcher(searchers);
    out.setSimilarity(s.getSimilarity());
    return out;
  }