    /*
     *  call-seq:
     *     index_writer.analyzer -> Analyzer
     *
     *  Set the Analyzer for this IndexWriter. This is useful if you need to
     *  change the analyzer for a special document. It is risky though as the
     *  same analyzer will be used for all documents during search.
     */
    static VALUE
    frb_iw_set_analyzer(VALUE self, VALUE ranalyzer)
    {
        IndexWriter *iw = (IndexWriter *)DATA_PTR(self);

        a_deref(iw->analyzer);
        iw->analyzer = frb_get_cwrapped_analyzer(ranalyzer);
        return ranalyzer;
    }