Imrpoved query model for main index