Replace dummy highlighting with one using makedocabstract().
In recent Recoll versions (from 1.18.2 I think), the Query class has a
makedocabstract() method which can perform proper highlighting. See
http://www.lesbonscomptes.com/recoll/usermanual/RCL.PROGRAM.API.html#RCL.PROGRAM.API.PYTHON
The Query method replaces and augments the Db one (which still exists).
Replace dummy highlighting with one using makedocabstract().