[FMS-267] Sorting was done on the field "thumbnail" that contains the path to the file => wrong. Fixed by generating a "has_tumbnail" field with 1 or 0 then sorting on that.