A SpanMultiTermQuery is the Spans version of MultiTermQuery, 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 SpanMultiTermQuery which matches all documents with the terms terms in the field field. terms should be an array of Strings.
static VALUE
frb_spanmtq_init(VALUE self, VALUE rfield, VALUE rterms)
{
Query *q = spanmtq_new(frb_field(rfield));
int i;
for (i = RARRAY_LEN(rterms) - 1; i >= 0; i--) {
spanmtq_add_term(q, StringValuePtr(RARRAY_PTR(rterms)[i]));
}
Frt_Wrap_Struct(self, NULL, &frb_q_free, q);
object_add(q, self);
return self;
}
Generated with the Darkfish Rdoc Generator 2.