8990919293949596
public static Field getDate(String field, Date date) { if (date == null) { return getDate(field); } else { return new Field (field, DateTools.dateToString( date, DateTools.Resolution.MILLISECOND ), Field.Store.YES, Field.Index.NOT_ANALYZED); } }
179180181182183184185186187188189
_log.error(e.getMessage()); } } if (text != null) { return new Field (field, text, Field.Store.YES, Field.Index.NOT_ANALYZED); } else { return new Field (field, reader); } }
189190191192193194195196197198199
} public static Field getKeyword(String field, String keyword) { //keyword = KeywordsUtil.escape(keyword); Field fieldObj = new Field (field, keyword, Field.Store.YES, Field.Index.NOT_ANALYZED); fieldObj.setBoost(0); return fieldObj; }