lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: RE : Potential Contribution
Date Tue, 07 Jan 2003 16:01:41 GMT
Otis,

Is ArrayList backward compatible with Java 1.0 or whatever version  
Lucene is trying to be compatible with?

--Peter


On Monday, January 6, 2003, at 06:34 PM, Otis Gospodnetic wrote:

> Thanks, I've finally added this to Document class.
> I replaced the Vector with (Array)List, but that's about it.
>
> Otis
>
> --- Rasik Pandey <rasik.pandey@ajlsm.com> wrote:
>> My apologies, the first attachement was an empty file.
>>
>> -----Message d'origine-----
>> De : Rasik Pandey [mailto:rasik.pandey@ajlsm.com]
>> Envoyé : mercredi 9 octobre 2002 17:10
>> À : lucene-dev@jakarta.apache.org
>> Objet : Potential Contribution
>>
>>
>> Developers,
>> Attached is a diff of Document.java. We added two methods for our
>> needs
>> which return multiple fields for a given field name and and another
>> which returns multiple values for a given field name. If you find
>> these
>> to be useful for Lucene, would someone please add them to the
>> sources.
>>
>> Rasik
>>> C:\Program Files\GNU\WinCvs 1.2\cvs.exe diff -r 1.3 -w
> Document.java
>> Index: Document.java
>> ===================================================================
>> RCS file:
>>
> /home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/document/ 
> Document.java,v
>> retrieving revision 1.3
>> diff -w -r1.3 Document.java
>> 57a58,59
>>> import java.util.Vector;
>>>
>> 149a152,177
>>>
>>>     public final Field[] getFields(String name) {
>>>         Vector tmp = new Vector();
>>>         for (DocumentFieldList list = fieldList; list != null; list
>> = list.next)
>>>             if (list.field.name().equals(name))
>>>                 tmp.add(list.field);
>>>         int l = tmp.size();
>>>         if (l == 0)
>>>             return null;
>>>         else {
>>>             Field[] fs = new Field[l];
>>>             for (int i = 0; i < l; i++)
>>>                 fs[i] = (Field) tmp.get(i);
>>>             return fs;
>>>         }
>>>     }
>>>
>>>     public final String[] getValues(String name) {
>>>         Field[] namedFields = getFields(name);
>>>         if (namedFields == null) return null;
>>>         String[] values = new String[namedFields.length];
>>>         for (int i = 0; i < namedFields.length; i++) {
>>>             values[i] = namedFields[i].stringValue();
>>>         }
>>>         return values;
>>>     }
>>
>> CVS command finished execution
>>
>>> --
>> To unsubscribe, e-mail:
>> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:    
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:  
> <mailto:lucene-dev-help@jakarta.apache.org>
>
>


--
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