Completed simply query system
Included optional parameter for index creation at constructor level