Barcelona were beaten 1-0 by Rayo Vallecano and it was a difficult result to take for under-pressure manager Ronald Koeman.