    /*
     *  call-seq:
     *     SpanPrefixQuery.new(field, prefix, max_terms = 256) -> query
     *
     *  Create a new SpanPrefixQuery which matches all documents with the prefix
     *  +prefix+ in the field +field+.
     */
    static VALUE
    frb_spanprq_init(int argc, VALUE *argv, VALUE self)
    {
        VALUE rfield, rprefix, rmax_terms;
        int max_terms = SPAN_PREFIX_QUERY_MAX_TERMS;
        Query *q;
        if (rb_scan_args(argc, argv, "21", &rfield, &rprefix, &rmax_terms) == 3) {
            max_terms = FIX2INT(rmax_terms);
        }
        q = spanprq_new(frb_field(rfield), StringValuePtr(rprefix));
        ((SpanPrefixQuery *)q)->max_terms = max_terms;
        Frt_Wrap_Struct(self, NULL, &frb_q_free, q);
        object_add(q, self);
        return self;
    }