lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Harwood (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-872) have Hits implement Iterable
Date Thu, 03 May 2007 06:38:15 GMT

    [ 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


Mime
View raw message