Using indexes and types send by the client