/* * call-seq: * BooleanQuery.new(coord_disable = false) * * Create a new BooleanQuery. If you don't care about the scores of the * sub-queries added to the query (as would be the case for many * automatically generated queries) you can disable the coord_factor of the * score. This will slightly improve performance for the query. Usually you * should leave this parameter as is. */ static VALUE frb_bq_init(int argc, VALUE *argv, VALUE self) { VALUE rcoord_disabled; bool coord_disabled = false; Query *q; if (rb_scan_args(argc, argv, "01", &rcoord_disabled)) { coord_disabled = RTEST(rcoord_disabled); } q = bq_new(coord_disabled); Frt_Wrap_Struct(self, &frb_bq_mark, &frb_q_free, q); object_add(q, self); return self; }