Updated scripts for advanced search with new requirements from #17076