What might be wrong with this attempt to highlight ES results?

Madness. I finally found the solution: using single-quotes (in Python) in constructing the query dict was the problem!

I replaced these with double-quotes and the problem has gone away. Quite strange.