Abolish "flags", add "type" and "indexOptions" instead.