add rule opt+field for dedup
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.