polish form search js
move mongo condition build to backend