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 16364] - Return multiple fields in Document
Date Sat, 25 Jan 2003 16:22:40 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=16364>.
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=16364

Return multiple fields in Document

ab@getopt.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From ab@getopt.org  2003-01-25 16:22 -------
Sorry, I missed that in my copy... However, the implementation uses Collections
framework. Below is the code rewritten using JDK1.1.x Vector:

   public final Field[] getFields(String name) {
     Vector tempFieldList = new Vector();
     for (DocumentFieldList list = fieldList; list != null; list = list.next) {
       if (list.field.name().equals(name)) {
         tempFieldList.add(list.field);
       }
     }
     int fieldCount = tempFieldList.size();
     if (fieldCount == 0)
       return null;
     else {
       Field[] fields = new Field[fieldCount];
       tempFieldList.copyInto(fields);
       return fields;
     }
   }

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


Mime
View raw message