public void setDefaults() {
emailFields = new LinkedHashMap<String,EmailField>();
emailFields.put("priority", new EmailField("priority","field_label_priority",SearchMethod.STORED,"priority",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.RESULTS));
emailFields.put("attach", new EmailField("attach","field_label_attach",SearchMethod.STORED,"attach",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.NOARCHIVERULE,AllowSearch.NOSEARCH,1,ShowInResults.RESULTS));
emailFields.put("score", new EmailField("score","field_label_score",SearchMethod.NONE,"score",
AllowExport.NOEXPORT,AllowViewMail.NOVIEWMAIL,AllowArchiveRule.NOARCHIVERULE,AllowSearch.NOSEARCH,5,ShowInResults.RESULTS));
emailFields.put("size", new EmailField("size","field_label_size",SearchMethod.STORED,"size",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,5,ShowInResults.RESULTS));
// set to NOSEARCH, as will always be searchable but must not appear in search field drop down
emailFields.put("sentdate", new EmailField("sentdate","field_label_sentdate",SearchMethod.STORED,"sentdate",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.NOSEARCH,12,ShowInResults.CONDITIONAL));
emailFields.put("archivedate", new EmailField("archivedate","field_label_archivedate",SearchMethod.STORED,"archivedate",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.NOSEARCH,12,ShowInResults.CONDITIONAL));
emailFields.put("receiveddate", new EmailField("receiveddate","field_label_receiveddate",SearchMethod.STORED,"receiveddate",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.NOSEARCH,12,ShowInResults.CONDITIONAL));
//emailFields.put("receivedate", new EmailField("receivedate","field_label_receivedate",SearchMethod.STORED,"receivedate",
// AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.NOSEARCH,12,ShowInResults.CONDITIONAL));
emailFields.put("from", new EmailField("from","field_label_from",SearchMethod.TOKENIZED_AND_STORED,"from",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,20,ShowInResults.RESULTS));
emailFields.put("to", new EmailField("to","field_label_to",SearchMethod.TOKENIZED_AND_STORED,"to",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,30,ShowInResults.RESULTS));
emailFields.put("subject", new EmailField("subject","field_label_subject",SearchMethod.TOKENIZED_AND_STORED,"subject",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,30,ShowInResults.RESULTS));
emailFields.put("cc", new EmailField("cc","field_label_cc",SearchMethod.TOKENIZED,"cc",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("bcc", new EmailField("bcc","field_label_bcc",SearchMethod.TOKENIZED,"bcc",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("deliveredto", new EmailField("deliveredto","field_label_deliveredto",SearchMethod.TOKENIZED,"deliveredto",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("flag", new EmailField("flag","field_label_flag",SearchMethod.TOKENIZED,"flag",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("sensitivity", new EmailField("sensitivity","field_label_sensitivity",SearchMethod.TOKENIZED,"sensitivity",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("sender", new EmailField("sender","field_label_sender",SearchMethod.TOKENIZED,"sender",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("recipient", new EmailField("recipient","field_label_recipient",SearchMethod.TOKENIZED,"recipient",
AllowExport.EXPORT,AllowViewMail.VIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("body", new EmailField("body","field_label_body",SearchMethod.TOKENIZED,"body",
AllowExport.NOEXPORT,AllowViewMail.NOVIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("attachments", new EmailField("attachments","field_label_attachments",SearchMethod.TOKENIZED,"attachments",
AllowExport.NOEXPORT,AllowViewMail.NOVIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
emailFields.put("attachname", new EmailField("attachname","field_label_attachname",SearchMethod.TOKENIZED_AND_STORED,"attachname",
AllowExport.NOEXPORT,AllowViewMail.NOVIEWMAIL,AllowArchiveRule.ARCHIVERULE,AllowSearch.SEARCH,1,ShowInResults.NORESULTS));
}