Query expansion with logs working