Order items by id when searching with query