From java-dev-return-19514-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Thu May 03 06:38:42 2007 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 96890 invoked from network); 3 May 2007 06:38:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 May 2007 06:38:40 -0000 Received: (qmail 61911 invoked by uid 500); 3 May 2007 06:38:43 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 61782 invoked by uid 500); 3 May 2007 06:38:43 -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 61624 invoked by uid 99); 3 May 2007 06:38:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 23:38:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 23:38:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A335771406E for ; Wed, 2 May 2007 23:38:15 -0700 (PDT) Message-ID: <15645011.1178174295666.JavaMail.jira@brutus> Date: Wed, 2 May 2007 23:38:15 -0700 (PDT) From: "Mark Harwood (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-872) have Hits implement Iterable In-Reply-To: <20329827.1178111115290.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 [ https://issues.apache.org/jira/browse/LUCENE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493289 ] Mark Harwood commented on LUCENE-872: ------------------------------------- I have some reservations about making it even easier for new Lucene users to write inefficient code. Iterating all the way across Hits is normally a poor way of achieving something in Lucene because of the repeated querying going on in the background. New users already fall into this trap too often and adding this feature will undoubtedly lure more people into writing bad "for" loops. > have Hits implement Iterable > ---------------------------- > > Key: LUCENE-872 > URL: https://issues.apache.org/jira/browse/LUCENE-872 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 2.1 > Environment: java 1.5 > Reporter: koen handekyn > Priority: Trivial > > for compatibilty with the enhanced for loop it is required that the Hits class implements the interface Iterable. no further code changes required as the method iterator required from the interface already is present. -- 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