analyzer = new ArchivaAnalyzer();
}
PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(analyzer);
if (operation==Operation.INDEX) {
wrapper.addAnalyzer("to", new EmailAnalyzer());
wrapper.addAnalyzer("from", new EmailAnalyzer());
wrapper.addAnalyzer("cc", new EmailAnalyzer());
wrapper.addAnalyzer("bcc", new EmailAnalyzer());
wrapper.addAnalyzer("deliveredto", new EmailAnalyzer());
wrapper.addAnalyzer("attachname", new FileNameAnalyzer());
} else {
wrapper.addAnalyzer("to", new WhitespaceAnalyzer());
wrapper.addAnalyzer("from", new WhitespaceAnalyzer());
wrapper.addAnalyzer("cc", new WhitespaceAnalyzer());