lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <>
Subject Re: Adding duplicate Fields to Documents
Date Mon, 26 Apr 2004 21:17:22 GMT
On Mon, Apr 26, 2004 at 04:36:22PM -0400, Gerard Sychay wrote:
> As two people have already stated, fields that are not tokenised are
> stored seprately.  Then a single document with two fields of the same
> name can be retrieved by searching for either of the fields.
> However, retrieving all of the field values seems to be impossible. 
> That is, given ("field_name", "keyword1") and ("field_name",
> "keyword2"), using doc.get("field_name") always returns "keyword2", the
> last value added.  Of course, I can't really think of a scenario where
> this would be a problem..
> Thanks for the help!

Use this method on yout document:

Field[]   getFields(String name)
          Returns an array of Fields with the given name.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message