+ (new KeywordSearchTerm("id", "", "id", "", "id")).index(theDoc, entity);
+
+ String textValue = entity.getFieldValue("webdb_create");
+ Calendar calendar = GregorianCalendar.getInstance();
+ int year;
+ int month;
+ int day;
+ int hours;
+ int minutes;
+ Date date;
+ String formattedDate="";
+
+ if (textValue!=null) {
+ try {
+ year = Integer.parseInt(textValue.substring(0, 4));
+ month = Integer.parseInt(textValue.substring(5, 7));
+ day = Integer.parseInt(textValue.substring(8, 10));
+ hours = Integer.parseInt(textValue.substring(11, 13));
+ minutes = Integer.parseInt(textValue.substring(14, 16));
+
+ calendar.set(year, month - 1, day, hours, minutes);
+ date = calendar.getTime();
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd hh:mm");
+ formattedDate = formatter.format(date);
+ }
+ catch (Throwable t) {
+ aLogger.warn("Error while generating content date to index", t);
+ }
+ }
+ (new KeywordSearchTerm("webdb_create_formatted", "search_date",
+ "webdb_create_formatted", "webdb_create_formatted",
+ "webdb_create_formatted")).indexValue(theDoc,formattedDate);