search: fix jrec handling
Reported-by: Samuele Kaplun <samuele.kaplun@cern.ch> Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>