/*
 *  call-seq:
 *     multi_term_query.add_term(term, score = 1.0) -> self
 *     multi_term_query << term1 << term2 << term3 -> self
 *
 *  Add a term to the MultiTermQuery with the score 1.0 unless specified
 *  otherwise.
 */
static VALUE
frb_mtq_add_term(int argc, VALUE *argv, VALUE self)
{
    GET_Q();
    VALUE rterm, rboost;
    float boost = 1.0;
    char *term = NULL;
    if (rb_scan_args(argc, argv, "11", &rterm, &rboost) == 2) {
        boost = (float)NUM2DBL(rboost);
    }
    term = StringValuePtr(rterm);
    multi_tq_add_term_boost(q, term, boost);

    return self;
}