First test code to implement automatic indexing