Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 61799 invoked from network); 24 Aug 2009 17:10:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Aug 2009 17:10:42 -0000 Received: (qmail 57447 invoked by uid 500); 24 Aug 2009 14:24:28 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 57379 invoked by uid 500); 24 Aug 2009 14:24:27 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 57371 invoked by uid 99); 24 Aug 2009 14:24:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2009 14:24:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2009 14:24:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5A178234C1EC for ; Mon, 24 Aug 2009 07:23:59 -0700 (PDT) Message-ID: <1953754972.1251123839368.JavaMail.jira@brutus> Date: Mon, 24 Aug 2009 07:23:59 -0700 (PDT) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1836) Flexible QueryParser fails with local different from en_US In-Reply-To: <217905161.1250848274860.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746890#action_12746890 ] Uwe Schindler commented on LUCENE-1836: --------------------------------------- The Buddhist calendar is internally a subclass of GregorianCalendar with some offsets... Interesting. [http://www.docjar.com/html/api/sun/util/BuddhistCalendar.java.html] The Java calendar will not overflow in 2038, as it uses a long (but the unix timestamp multiplied with 1000L), so it should last for several thousand/million years (I tested this), especially as the unix epoch is still always the same point in time (1970-01-01 expressed in the GregorianCalendar) The problem with DateTools is more, that the values stored in index are not correctly normalized, so the index would not work on another locale (especially as parsing the dates may fail, because other number of days per month). All date/times with DateTools should be indexed as normalized values (gregorian with GMT/UTC TZ) to achieve interoperability. The same like indexing date/time with NumericField using the ms since unix epoch. > Flexible QueryParser fails with local different from en_US > ---------------------------------------------------------- > > Key: LUCENE-1836 > URL: https://issues.apache.org/jira/browse/LUCENE-1836 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/* > Affects Versions: 2.9 > Reporter: Uwe Schindler > Assignee: Luis Alves > Fix For: 2.9 > > Attachments: LUCENE-1836.patch, LUCENE-1836.patch, LUCENE-1836.patch, LUCENE-1836.patch > > > I get the following error during the mentioned testcases on my computer, if I use the Locale de_DE (windows 32): > {code} > [junit] Testsuite: org.apache.lucene.queryParser.standard.TestQPHelper > [junit] Tests run: 29, Failures: 1, Errors: 0, Time elapsed: 1,156 sec > [junit] > [junit] ------------- Standard Output --------------- > [junit] Result: (fieldX:xxxxx fieldy:xxxxxxxx)^2.0 > [junit] ------------- ---------------- --------------- > [junit] Testcase: testLocalDateFormat(org.apache.lucene.queryParser.standard.TestQPHelper): FAILED > [junit] expected:<1> but was:<0> > [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0> > [junit] at org.apache.lucene.queryParser.standard.TestQPHelper.assertHits(TestQPHelper.java:1148) > [junit] at org.apache.lucene.queryParser.standard.TestQPHelper.testLocalDateFormat(TestQPHelper.java:1005) > [junit] at org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:201) > [junit] > [junit] > [junit] Test org.apache.lucene.queryParser.standard.TestQPHelper FAILED > [junit] Testsuite: org.apache.lucene.queryParser.standard.TestQueryParserWrapper > [junit] Tests run: 27, Failures: 1, Errors: 0, Time elapsed: 1,219 sec > [junit] > [junit] ------------- Standard Output --------------- > [junit] Result: (fieldX:xxxxx fieldy:xxxxxxxx)^2.0 > [junit] ------------- ---------------- --------------- > [junit] Testcase: testLocalDateFormat(org.apache.lucene.queryParser.standard.TestQueryParserWrapper): FAILED > [junit] expected:<1> but was:<0> > [junit] junit.framework.AssertionFailedError: expected:<1> but was:<0> > [junit] at org.apache.lucene.queryParser.standard.TestQueryParserWrapper.assertHits(TestQueryParserWrapper.java:1120) > [junit] at org.apache.lucene.queryParser.standard.TestQueryParserWrapper.testLocalDateFormat(TestQueryParserWrapper.java:985) > [junit] at org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:201) > [junit] > [junit] > [junit] Test org.apache.lucene.queryParser.standard.TestQueryParserWrapper FAILED > {code} > With en_US as locale it works. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org