reworked advsearch backend to fix whatever was causing it to error out when searching using certain fields