Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 59028 invoked from network); 21 Jun 2006 21:28:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 21:28:58 -0000 Received: (qmail 81084 invoked by uid 500); 21 Jun 2006 21:28:57 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 80715 invoked by uid 500); 21 Jun 2006 21:28:56 -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 80704 invoked by uid 99); 21 Jun 2006 21:28:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 14:28:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 14:28:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7F781410005 for ; Wed, 21 Jun 2006 21:27:30 +0000 (GMT) Message-ID: <18667358.1150925250503.JavaMail.jira@brutus> Date: Wed, 21 Jun 2006 21:27:30 +0000 (GMT+00:00) From: "Yonik Seeley (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-609) Lazy field loading breaks backward compat In-Reply-To: <7193120.1150915770981.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-609?page=comments#action_12417193 ] Yonik Seeley commented on LUCENE-609: ------------------------------------- > I'm late to the discussion Yes, I didn't leave much time for debate :-) I really wanted to get back to something backward compatible so I could update Solr to use the latest Lucene. > but it seems invalid to me. Won't getField() get a class cast exception Yes, as I noted here: http://www.nabble.com/Fieldable-breaks-backward-compatibility-t1825407.html#a4979233 But only if you are using the new Field options. That's the price to pay for backward compatibility, but it's a much better alternative than breaking everyones code when it's not necessary. > it would have to do type testing on the members of fields. The JVM does this for us :-) > Searchable was the same kind of thing. I don't recall if it did breack backward compatibility, but even so... how many people write their own Searchers/IndexReaders vs how many people call Document.getField()? > Lazy field loading breaks backward compat > ----------------------------------------- > > Key: LUCENE-609 > URL: http://issues.apache.org/jira/browse/LUCENE-609 > Project: Lucene - Java > Type: Bug > Components: Other > Versions: 2.0.1 > Reporter: Yonik Seeley > Assignee: Yonik Seeley > Fix For: 2.0.1 > Attachments: fieldable_patch.diff > > Document.getField() and Document.getFields() have changed in a non backward compatible manner. > Simple code like the following no longer compiles: > Field x = mydoc.getField("x"); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org