Fixed lexing issues that caused unicode errors, required updating type attribute.

Fixed it so search can be the name of a field or a searched value now.