Solr: org.apache.solr.common.SolrException: Invalid date string:

I am new to solr and this is my first attempt to index solr data. When indexing, I get the following exception:

org.apache.solr.common.SolrException: Invalid date string: '2011-01-07' at org.apache.solr.schema.DateField.parseMath (DateField.java:165) at org.apache.solr.schema.TrieDateField .createField (TrieDateField.java:169) at org.apache.solr.schema.SchemaField.createField (SchemaField.java:98) at org.apache.solr.update.DocumentBuilder.addField (DocumentBuilder.java:204) at org. apache.solr.update.DocumentBuilder.toDocument (DocumentBuilder.java:277)

I understand, after reading some articles that Solr only stores time in UTC, this is a query I'm trying to index,

Select identifier, text, language, links, tweetType, source, location, biography, url, utcOffset, timeZone, frenCnt, createdAt, createdOnGMT, createdOnServerTime, follCnt, favCnt, totStatusCnt, usrCrtDate, humanSentiment, reply, authenticated gemsame, location, replyMongidid , country, continent, placeLongitude, placeLatitude, indicated by Ct, hashtag, mentions, senderInfScr, createdOnGMTDate, DATE_FORMAT (CONVERT_TZ (createdOnGMTDate, '+ 00:00', '+ 05:30'), '% Y-% m-% d' ) as IST, DATE_FORMAT (CONVERT_TZ (createdOnGMTDate, '+ 00:00', '+ 01:00'), '% Y-% m-% d') as ECT, DATE_FORMAT (CONVERT_TZ (createdOnGMTDate, '+00 : 00 ',' + 02:00 '),'% Y-% m-% d ') as EET, DATE_FORMAT (CONVERT_TZ (createdOnGMTDate,' + 00:00 ',' + 03:30 '),'% Y-% m-% d ') as MET, sign (classified) as feeling from

, . ?

,

+5
2

, , "" , ( UTC), , , UTC.

facet.range = dateField
facet.range.start = 2011-01-01T00:00:00Z+${useroffset}MINUTES
facet.range.gap = +1DAY

, .

,

: Chris Hostetter ( Solr)

-3

Solr 1995-12-31T23:59:59Z. , .

. DateField javadocs.

+16

All Articles