[flex] implementing search.