    /*
     *  call-seq:
     *     iw.add_readers(reader_array) -> iw
     *
     *  Use this method to merge other indexes into the one being written by
     *  IndexWriter. This is useful for parallel indexing. You can have several
     *  indexing processes running in parallel, possibly even on different
     *  machines. Then you can finish by merging all of the indexes into a single
     *  index.
     */
    static VALUE
    frb_iw_add_readers(VALUE self, VALUE rreaders)
    {
        IndexWriter *iw = (IndexWriter *)DATA_PTR(self);
        int i;
        IndexReader **irs;
        Check_Type(rreaders, T_ARRAY);

        irs = ALLOC_N(IndexReader *, RARRAY_LEN(rreaders));
        i = RARRAY_LEN(rreaders);
        while (i-- > 0) {
            IndexReader *ir;
            Data_Get_Struct(RARRAY_PTR(rreaders)[i], IndexReader, ir);
            irs[i] = ir;
        }
        iw_add_readers(iw, irs, RARRAY_LEN(rreaders));
        free(irs);
        return self;
    }