Searched defs:date (Results 1 - 15 of 15) sorted by relevance

/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/document/
H A DDateField.java32 * The strings are structured so that lexicographic sorting orders by date,
49 * date/time are.
65 // make date strings long enough to last a millenium
83 * @throws RuntimeException if the date specified in the
86 public static String dateToString(Date date) { argument
87 return timeToString(date.getTime());
115 /** Converts a string-encoded date into a millisecond time. */
119 /** Converts a string-encoded date into a Date object. */
H A DDateTools.java33 * them by date, which makes them suitable for use as field values
47 * date/time are.
82 * @param date the date to be converted
88 public static String dateToString(Date date, Resolution resolution) { argument
89 return timeToString(date.getTime(), resolution);
95 * @param time the date expressed as milliseconds since January 1, 1970, 00:00:00 GMT
102 final Date date = new Date(round(time, resolution));
103 return TL_FORMATS.get()[resolution.formatLen].format(date);
111 * @param dateString the date strin
147 round(Date date, Resolution resolution) argument
[all...]
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/document/
H A DTestDateTools.java51 d = DateTools.stringToDate("97"); // no date
55 d = DateTools.stringToDate("200401011235009999"); // no date
59 d = DateTools.stringToDate("aaaa"); // no date
118 // date before 1970:
153 Date date = cal.getTime();
154 assertEquals("2004-02-03 22:08:56:333", isoFormat(date));
156 Date dateYear = DateTools.round(date, DateTools.Resolution.YEAR);
159 Date dateMonth = DateTools.round(date, DateTools.Resolution.MONTH);
162 Date dateDay = DateTools.round(date, DateTools.Resolution.DAY);
165 Date dateHour = DateTools.round(date, DateTool
185 isoFormat(Date date) argument
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/document/
H A DTestDateTools.java44 d = DateTools.stringToDate("97"); // no date
48 d = DateTools.stringToDate("200401011235009999"); // no date
52 d = DateTools.stringToDate("aaaa"); // no date
111 // date before 1970:
146 Date date = cal.getTime();
147 assertEquals("2004-02-03 22:08:56:333", isoFormat(date));
149 Date dateYear = DateTools.round(date, DateTools.Resolution.YEAR);
152 Date dateMonth = DateTools.round(date, DateTools.Resolution.MONTH);
155 Date dateDay = DateTools.round(date, DateTools.Resolution.DAY);
158 Date dateHour = DateTools.round(date, DateTool
178 isoFormat(Date date) argument
[all...]
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/
H A DDemoHTMLParser.java32 public DocData parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat) throws IOException, InterruptedException { argument
53 if (date == null && props.getProperty("date")!=null) {
55 date = dateFormat.parse(props.getProperty("date").trim());
57 // do not fail test just because a date could not be parsed
58 System.out.println("ignoring date parse exception (assigning 'now') for: "+props.getProperty("date"));
59 date = new Date(); // now
68 docData.setDate(date);
[all...]
H A DHTMLParser.java32 * The provided name,title,date are used for the result, unless when they're null,
36 * @param date date of the result doc data. If null, attempt to set by parsed data.
39 * @param dateFormat date formatter to use for extracting the date.
44 public DocData parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat) throws IOException, InterruptedException; argument
H A DDocData.java31 private String date; field in class:DocData
39 date = null;
49 * @return the date. If the ctor with Date was called, then the String
55 return date;
78 public void setDate(Date date) { argument
79 if (date != null) {
80 setDate(DateTools.dateToString(date, DateTools.Resolution.SECOND));
82 this.date = null;
86 public void setDate(String date) { argument
87 this.date
[all...]
/lucene-3.6.0/solr/core/src/test/org/apache/solr/schema/
H A DNumericFieldsTest.java32 static String[] types = new String[]{"int", "long", "float", "double", "date"};
34 public static SolrInputDocument getDoc(String id, Integer number, String date) { argument
38 if ("date".equals(t)) {
39 doc.addField(t, date);
40 doc.addField(t + "_last", date);
41 doc.addField(t + "_first", date);
64 if ("date".equals(t)) {
/lucene-3.6.0/lucene/contrib/queries/src/test/org/apache/lucene/search/
H A DDuplicateFilterTest.java74 private void addDoc(RandomIndexWriter writer, String url, String text, String date) throws IOException argument
79 doc.add(newField("date",date,Field.Store.YES,Field.Index.ANALYZED));
H A DBooleanFilterTest.java61 private void addDoc(RandomIndexWriter writer, String accessRights, String price, String date, String inStock) throws IOException argument
66 doc.add(newField("date",date,Field.Store.YES,Field.Index.ANALYZED));
196 booleanFilter.add(getRangeFilter("date", "20040101", "20041231"), Occur.MUST);
204 booleanFilter.add(getRangeFilter("date", "20050101", "20051231"), Occur.MUST);
212 booleanFilter.add(getRangeFilter("date", "20050101", "20051231"), Occur.MUST);
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/util/
H A DLineFileDocs.java115 final Field date; field in class:LineFileDocs.DocState
132 date = new Field("date", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
133 doc.add(date);
174 docState.date.setValue(line.substring(1+spot, spot2));
/lucene-3.6.0/lucene/backwards/src/test-framework/java/org/apache/lucene/util/
H A DLineFileDocs.java115 final Field date; field in class:LineFileDocs.DocState
132 date = new Field("date", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
133 doc.add(date);
174 docState.date.setValue(line.substring(1+spot, spot2));
/lucene-3.6.0/solr/solrj/src/java/org/apache/solr/common/util/
H A DDateUtil.java39 * Date format pattern used to parse HTTP date headers in RFC 1123 format.
44 * Date format pattern used to parse HTTP date headers in RFC 1036 format.
49 * Date format pattern used to parse HTTP date headers in ANSI C
72 * A suite of default date formats that can be parsed, and thus transformed to the Solr specific format
90 * @param d The input date to parse
111 * Parses the date value using the given date formats.
113 * @param dateValue the date value to parse
114 * @param dateFormats the date formats to use
119 * @return the parsed date
201 formatDate(Date date, Calendar cal, Appendable out) argument
[all...]
/lucene-3.6.0/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/
H A DTestNumericQueryParser.java70 final private static String DATE_FIELD_NAME = "date";
86 private static boolean checkDateFormatSanity(DateFormat dateFormat, long date) argument
88 return date == dateFormat.parse(dateFormat.format(new Date(date)))
115 // assumes localized date pattern will have at least year, month, day,
120 // not all date patterns includes era, full year, timezone and second,
130 // prune date value so it doesn't pass in insane values to some
/lucene-3.6.0/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/
H A DMailEntityProcessor.java508 public MailsSinceLastCheckFilter(Date date) { argument
509 since = date;

Completed in 281 milliseconds