Optimize GetSearchTerms