A SpanPrefixQuery is the Spans version of PrefixQuery, the only difference being that it returns the start and end offset of all of its matches for use by enclosing SpanQueries.
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; }
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.