lib/vsm: introduce an indexing process based on VSM