    /*
     *  call-seq:
     *     index_reader.term_vector(doc_id, field) -> TermVector
     *
     *  Return the TermVector for the field +field+ in the document at +doc_id+ in
     *  the index. Return nil if no such term_vector exists. See TermVector.
     */
    static VALUE
    frb_ir_term_vector(VALUE self, VALUE rdoc_id, VALUE rfield)
    {
        IndexReader *ir = (IndexReader *)DATA_PTR(self);
        TermVector *tv;
        VALUE rtv;
        tv = ir->term_vector(ir, FIX2INT(rdoc_id), frb_field(rfield));
        if (tv) {
            rtv = frb_get_tv(tv);
            tv_destroy(tv);
            return rtv;
        }
        else {
            return Qnil;
        }
    }