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 AFF3FD3E9 for ; Mon, 10 Sep 2012 09:40:55 +0000 (UTC) Received: (qmail 84770 invoked by uid 500); 10 Sep 2012 09:40:52 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 84494 invoked by uid 500); 10 Sep 2012 09:40:51 -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 84462 invoked by uid 99); 10 Sep 2012 09:40:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 09:40:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pranny@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-lpp01m010-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 09:40:43 +0000 Received: by lagr15 with SMTP id r15so1168101lag.35 for ; Mon, 10 Sep 2012 02:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=/5LfvW1GOjuMAFhmJ25Zx6yTVxcEzAhx0T3EZWNHpJg=; b=cr0p+4GRx3ffhmJHWfyvzlMbUEfDUx/LXuqaAxZP5l8G804gFWt47/fzW4JU0sPCAk pUpKHHAaQdhTGQn7712pcLxet/+WM5OLz/YI51mh1GU4bRCjK6WcYAOh9MyEcmbJoW/w hOwd1saWnVPpDyXM+LG+JrN7lFnUTxQXYIzta3LuABeBxqBUn3Qyd2xnavWIgTuIMK6H 6uKE8gH8uDJ0sziSEUHoixPnkcso+DNzdM/yf6yZEz2hxLSOPa09lW6mbP1gvswrOFDB UZZjCWMDhrXeaVJ9pW2qmSU5rpknASpSrrVo1rjQYOuskyUZDeklLhwuQUJbanqY8Otn bRbQ== Received: by 10.112.37.102 with SMTP id x6mr4723865lbj.66.1347270022659; Mon, 10 Sep 2012 02:40:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.63.47 with HTTP; Mon, 10 Sep 2012 02:40:01 -0700 (PDT) In-Reply-To: References: <504A6B36.4040304@elyograg.org> From: Pranav Prakash Date: Mon, 10 Sep 2012 15:10:01 +0530 Message-ID: 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 To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=e0cb4efe35861e001004c955bf7d --e0cb4efe35861e001004c955bf7d Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable The character is actually - =93 and not " *Pranav Prakash* "temet nosce" On Mon, Sep 10, 2012 at 2:45 PM, Pranav Prakash wrote: > I am experiencing similar problem related to encoding. In my case, the > char like " (double quote) > is also garbaled. > > I believe this is because the encoding in my MySQL table is latin1 and in > the JDBC it is being specified as UTF-8. Is there a way to specify latin1 > charset in JDBC? probably that would resolve this. > > > *Pranav Prakash* > > "temet nosce" > > > > > On Sat, Sep 8, 2012 at 3:16 AM, Shawn Heisey wrote: > >> 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 befo= re >> 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 th= e >> driver in the dataimport config. The character set in the database is u= tf8. >> >> > driver=3D"com.mysql.jdbc.Driver" >> encoding=3D"UTF-8" >> url=3D"jdbc:mysql://${**dataimporter.request.dbHost}:** >> 3306/${dataimporter.request.**dbSchema}?**zeroDateTimeBehavior=3D** >> convertToNull" >> batchSize=3D"-1" >> user=3D"" >> password=3D""/> >> >> Thanks, >> Shawn >> >> > --e0cb4efe35861e001004c955bf7d--