First attempt at serializing the search pattern.