Similar Items: Data optimizations for constraint automata