Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Invalid
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: core/search
    • Labels:
      None
    • Environment:

      java 1.5

    • Lucene Fields:
      New

      Description

      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.

        Activity

        Hide
        DM Smith added a comment -

        This will need to wait until Java 1.4.2 is no longer our target language.

        Show
        DM Smith added a comment - This will need to wait until Java 1.4.2 is no longer our target language.
        Hide
        Mark Harwood added a comment -

        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.

        Show
        Mark Harwood added a comment - 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.
        Hide
        Mark Miller added a comment -

        Hits is deprecated.

        Show
        Mark Miller added a comment - Hits is deprecated.

          People

          • Assignee:
            Unassigned
            Reporter:
            koen handekyn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development