[ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]