lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23655] New: - Provide a java.util.List wrapper around the Hits object
Date Tue, 07 Oct 2003 17:36:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23655>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23655

Provide  a java.util.List wrapper around the Hits object

           Summary: Provide  a java.util.List wrapper around the Hits object
           Product: Lucene
           Version: CVS Nightly - Specify date in submission
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Search
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: Eric.Isakson@sas.com


Saw this on the user list and thought it might be a nice feature to add. I
wasn't sure if there would be an objection to modifying Hits to extend
AbstractList, so I implemented it both as a separate wrapper class and by making
the current Hits object extend AbstractList.

There is a separate patch for each. Only one should be applied, I'll leave it to
the more experienced folks to vote on which one should be used (if it should be
used at all). My preference is for the modification to the Hits object.

Eric

copied from Tatu's message on the Lucene user list...

On Monday 06 October 2003 08:35, Lars Hammer wrote:
...
> to iterate the Hits. I thought that Hits was an array of pointers to docs,

                                                                   ^^^
Actually, Hits contains a Vector (could be an array as well), but is not a
Collection itself (one can not extend array classes in Java, so no Object
besides basic arrays can be arrays or treates as one).
Hits be made a Collection, though.
In fact, I think it would be a reasonable thing to do, to make Hits be
a simple Collection (or perhaps List since it is an ordered collection).
You could file an RFE for this, or better yet, implement it. :-)
I'd think including such patch for Lucene would make sense as well.

> Has anyone any experience in using the <logic:iterate> tag or is it
> necessary to write a custom JSP tag which does the iteration??

No, it should be enough to write a simple wrapper that implements
Collection, and accesses Hits instance via next() method.

-+ Tatu +-

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message