Sort results by revelance.
Fixed syntax error.
Correctly count thread participants.
Corrected function call
Changed search views for objects as preparation for #149.