Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C4DBD426 for ; Fri, 7 Sep 2012 21:47:18 +0000 (UTC) Received: (qmail 10837 invoked by uid 500); 7 Sep 2012 21:47:14 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 10780 invoked by uid 500); 7 Sep 2012 21:47:14 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 10772 invoked by uid 99); 7 Sep 2012 21:47:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2012 21:47:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=FSL_RCVD_USER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of solr@elyograg.org designates 166.70.79.219 as permitted sender) Received: from [166.70.79.219] (HELO frodo.elyograg.org) (166.70.79.219) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2012 21:47:08 +0000 Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id 270994BF2 for ; Fri, 7 Sep 2012 15:46:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=mail; t=1347054403; bh=mlZ44O8IeR3kSRhQ1kDZI4uFQfVDu9ibw/GfRlEoHRs=; b=q/fWx07OauT8 uhdYamILNlRhlarSzPECgXzZHclGA4LoQNsKL3FhqcONMKgrjR29A8+gTmxsWHyw keQ6LSdp80opLZBNsTO2ZK6ztzHNvVufzxKIvx1X8nf/NOA7W5d0OqIvmiKJztaP Fw/CbA1cDZgD/SjLunnXK3IJEx53Twk= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xW8VKU1keNe6 for ; Fri, 7 Sep 2012 15:46:43 -0600 (MDT) Received: from [10.2.0.180] (client175.mainstreamdata.com [209.63.42.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id 4CFC66A3 for ; Fri, 7 Sep 2012 15:46:43 -0600 (MDT) Message-ID: <504A6B36.4040304@elyograg.org> Date: Fri, 07 Sep 2012 15:46:30 -0600 From: Shawn Heisey User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: solr-user@lucene.apache.org Subject: Re: Importing of unix date format from mysql database and dates of format 'Thu, 06 Sep 2012 22:32:33 +0000' in Solr 4.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 9/6/2012 6:54 PM, kiran chitturi wrote: > The error i am getting is 'org.apache.solr.common.SolrException: Invalid > Date String: '1345743552'. > > I think it was being saved as a string in DB, so i will use the > DateFormatTransformer. To go along with all the other replies that you have gotten: I import from MySQL with a unix format date field. It's a bigint, not a string, but a quick test on MySQL 5.1 shows that the function works with strings too. This is how my SELECT handles that field - I have MySQL convert it before it gets to Solr: from_unixtime(`d`.`post_date`) AS `pd` When it comes to the character set issues, this is how I have defined the driver in the dataimport config. The character set in the database is utf8. Thanks, Shawn