Trunc php and custom search upgrades for querying.