fixed the bug of elasticsearch that everything is retrieved from the index