/*
* 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
frt_fis_init(int argc, VALUE *argv, VALUE self)
{
VALUE roptions;
FieldInfos *fis;
enum StoreValues store = STORE_YES;
enum IndexValues index = INDEX_YES;
enum TermVectorValues term_vector = TERM_VECTOR_WITH_POSITIONS_OFFSETS;
float boost;
rb_scan_args(argc, argv, "01", &roptions);
if (argc > 0) {
frt_fi_get_params(roptions, &store, &index, &term_vector, &boost);
}
fis = fis_new(store, index, term_vector);
Frt_Wrap_Struct(self, &frt_fis_mark, &frt_fis_free, fis);
object_add(fis, self);
return self;
}