/* * call-seq: * TermQuery.new(field, term) -> term_query * * Create a new TermQuery object which will match all documents with the term * +term+ in the field +field+. * * Note: As usual, field should be a symbol */ static VALUE frt_tq_init(VALUE self, VALUE rfield, VALUE rterm) { char *field = frt_field(rfield); char *term = rs2s(rb_obj_as_string(rterm)); Query *q = tq_new(field, term); Frt_Wrap_Struct(self, NULL, &frt_q_free, q); object_add(q, self); return self; }