/* * call-seq: * FieldInfos.new(defaults = {}) -> field_infos * * Create a new FieldInfos object which uses the default values for fields * specified in the +default+ hash parameter. See FieldInfo for available * property values. */ static VALUE frb_fis_init(int argc, VALUE *argv, VALUE self) { VALUE roptions; FieldInfos *fis; StoreValue store = STORE_YES; IndexValue index = INDEX_YES; TermVectorValue term_vector = TERM_VECTOR_WITH_POSITIONS_OFFSETS; float boost; rb_scan_args(argc, argv, "01", &roptions); if (argc > 0) { frb_fi_get_params(roptions, &store, &index, &term_vector, &boost); } fis = fis_new(store, index, term_vector); Frt_Wrap_Struct(self, &frb_fis_mark, &frb_fis_free, fis); object_add(fis, self); return self; }