Magento solr Invalid Date String:'false'
We are getting below message during solr indexing running by cron setting in magento. Aug 12, 2013 8:06:15 AM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {add=[24P1602]} 0 1 Aug 12, 2013 8:06:16 AM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: ERROR: [doc=24P1602] Error adding field 'lepubdate_datetime'='false' at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:333) at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) at org.apache.solr.handler.JsonLoader.processUpdate(JsonLoader.java:100) at org.apache.solr.handler.JsonLoader.load(JsonLoader.java:75) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:244) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.solr.common.SolrException: Invalid Date String:'false' at org.apache.solr.schema.DateField.parseMath(DateField.java:161) at org.apache.solr.schema.TrieField.createField(TrieField.java:419) at org.apache.solr.schema.TrieDateField.createField(TrieDateField.java:120) at org.apache.solr.schema.SchemaField.createField(SchemaField.java:103) at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:203) at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:286) ... 22 more Aug 12, 2013 8:06:16 AM org.apache.solr.core.SolrCore execute = Best to post to the solr-user list rather than general, but looks like you've got a type mismatch: 'lepubdate_datetime'='false' What type is lepubdate_datetime? I'm guessing it's a date type and shouldn't be getting the value 'false' :) Erik === Hi Eric, Can you please let me know where should i look to correct the issue. In database i have found that there is lepubdate field in eav_attribute table with backend_type as datetime. But there are not any field such as 'lepubdate_datetime' in database. but solr giving 'lepubdate_datetime'='false' error in his log. Thanks Nikesh -- View this message in context: http://lucene.472066.n3.nabble.com/Magento-solr-Invalid-Date-String-false-tp4086747.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Magento solr Invalid Date String:'false'
Invalid Date String:'false' That's correct, false is not a valid date in Solr. Solr uses ISO format: -MM-DDThh:mm:ss[.ttt]Z. You obviously have some issue with whatever software is feeding data into Solr. Nothing we can do to help you there, other than to tell you to make sure you feed clean data into Solr. I suspect this field is a dynamic field (a dynamicField element with the pattern *_datetime). Nothing wrong with that - just make sure you only populate the field with valid date data. -- Jack Krupansky -Original Message- From: Nikesh12 Sent: Tuesday, August 27, 2013 1:38 AM To: solr-user@lucene.apache.org Subject: Magento solr Invalid Date String:'false' We are getting below message during solr indexing running by cron setting in magento. Aug 12, 2013 8:06:15 AM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {add=[24P1602]} 0 1 Aug 12, 2013 8:06:16 AM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: ERROR: [doc=24P1602] Error adding field 'lepubdate_datetime'='false' at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:333) at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) at org.apache.solr.handler.JsonLoader.processUpdate(JsonLoader.java:100) at org.apache.solr.handler.JsonLoader.load(JsonLoader.java:75) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:244) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.solr.common.SolrException: Invalid Date String:'false' at org.apache.solr.schema.DateField.parseMath(DateField.java:161) at org.apache.solr.schema.TrieField.createField(TrieField.java:419) at org.apache.solr.schema.TrieDateField.createField(TrieDateField.java:120) at org.apache.solr.schema.SchemaField.createField(SchemaField.java:103) at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:203) at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:286) ... 22 more Aug 12, 2013 8:06:16 AM org.apache.solr.core.SolrCore execute = Best to post to the solr-user list rather than general, but looks like you've got a type mismatch: 'lepubdate_datetime'='false' What type is lepubdate_datetime? I'm guessing it's a date type and shouldn't be getting the value 'false' :) Erik === Hi Eric, Can you please let me know where should i look to correct the issue. In database i have found that there is lepubdate field in eav_attribute table with backend_type as datetime. But there are not any field such as 'lepubdate_datetime' in database. but solr giving 'lepubdate_datetime'='false' error in his log. Thanks Nikesh -- View this message in context: http://lucene.472066.n3.nabble.com/Magento-solr-Invalid-Date-String-false-tp4086747.html Sent from the Solr - User mailing list archive at Nabble.com.
solr invalid date string
I'm currently running solr 4.0 alpha with manifoldCF v1.1 dev Manifold is sending solr the datetime as milliseconds expired after 1-1-1970. I've tried setting several date.formats in the extraction handler but I always get this error: and the manifoldcf crawl aborts. SolrCoreorg.apache.solr.common.SolrException: Invalid Date String:'134738361' at org.apache.solr.schema.DateField.parseMath(DateField.java:174) at org.apache.solr.schema.TrieField.createField(TrieField.java:540) here's my extraction handler: requestHandler name=/update/extract class=org.apache.solr.handler.extraction.ExtractingRequestHandler lst name=defaults str name=fmap.contenttext/str str name=fmap.titlesolr.title/str str name=fmap.namesolr.name/str str name=linklink/str str name=fmap.pubdatepubdate/str str name=summarysummary/str str name=descriptioncomments/str str name=publishedpublished/str str name=fmap.Last-Modifiedlast_modified/str str name=uprefixattr_/str str name=lowernamestrue/str str name=fmap.divignored_/str /lst lst name=date.formats str-MM-dd/str str-MM-dd'T'HH:mm:ss.SSS'Z'/str /lst /lst-- /requestHandler here's pubdate in the schema field name=pubdate type=date indexed=true stored=true multiValued=true/ the dates are already in UTC time they're just in milliseconds... What am I doing wrong? -- View this message in context: http://lucene.472066.n3.nabble.com/solr-invalid-date-string-tp4031661.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr invalid date string
: Manifold is sending solr the datetime as milliseconds expired after : 1-1-1970. Hmm... are you certain there is no way to change ManifoldCF to send the date in ISO-8601 canonical so Solr can handle it natively? : I've tried setting several date.formats in the extraction handler but I Are you sure ExtractingRequestHandler is what ManifoldCF expects to send the documents to? I thought ManifoldCF took care of all the parsing and send in structured documents? If it is ExtractingRequestHandler you need to use, then i think you are missunderstanding hte point of date.formats... : lst name=date.formats : str-MM-dd/str : str-MM-dd'T'HH:mm:ss.SSS'Z'/str : /lst ...my understanidng is that you should be configuring date.formats with the formats you want ExtractingRequestHandler to use to *parse* your raw input -- ie: -MM-dd is what you specify if the raw values in your document will look like 2001-12-30... http://wiki.apache.org/solr/ExtractingRequestHandler Unfortunately, i don't believe SimpleDateFormat has a pattern for specifying millis since epoch ... so you may need to use an UpdateRequestProcessor for this. I would sanity check on the ManifoldCF user list that there isn't already an easier way to do this on the client side. -Hoss
Re: solr invalid date string
I'll certainly ask manifold if they can send the date in the correct format. Meanwhile; How would I create an updater to change the format of a date? Are there any decent examples out there? thanks, -- View this message in context: http://lucene.472066.n3.nabble.com/solr-invalid-date-string-tp4031661p4031669.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solr invalid date string
One quick and not so dirty way to do this is to use the http://wiki.apache.org/solr/ScriptUpdateProcessor. Oops, sorry the wiki is a bit sparse currently, but the feature is documented in the Solr 4.0 release as collection1/conf/update-script.js in the Solr example. It'll probably require a little trial and error to get the script to do what you want just right, but shouldn't be too bad. Let us know if you try this and what effect it has on your indexing performance (that's my biggest concern with this new feature). You can also write the same sort of thing as a UpdateProcessor in Java and plugged into Solr more natively and surely also more performantly (but ideally only marginally so ultimately). Erik On Jan 8, 2013, at 15:21 , eShard wrote: I'll certainly ask manifold if they can send the date in the correct format. Meanwhile; How would I create an updater to change the format of a date? Are there any decent examples out there? thanks, -- View this message in context: http://lucene.472066.n3.nabble.com/solr-invalid-date-string-tp4031661p4031669.html Sent from the Solr - User mailing list archive at Nabble.com.