/* * call-seq: * SpanMultiTermQuery.new(field, terms) -> query * * 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 frt_spanmtq_init(VALUE self, VALUE rfield, VALUE rterms) { Query *q = spanmtq_new(frt_field(rfield)); int i; for (i = RARRAY(rterms)->len - 1; i >= 0; i--) { spanmtq_add_term(q, StringValuePtr(RARRAY(rterms)->ptr[i])); } Frt_Wrap_Struct(self, NULL, &frt_q_free, q); object_add(q, self); return self; }