lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: Several fields with the same name
Date Wed, 20 Nov 2002 15:33:42 GMT
Maybe you can show the actual output of this piece of code.
What do you get?  Show...

--- Rob Outar <routar@ideorlando.org> wrote:
> Otis,
> 
> 	Tried this:
> 
>         f = doc.get(key);
> 
>         while (f != null ) {
>             l.add(f);
>             //get next value for same key
>             f = doc.get(key);
>             System.out.println(f);
>         }
> 
> I got an outofmemory error after a while so it looks like it will
> keep
> returning the same value, and not null;
> 
> Thanks,
> 
> Rob
> 
> 
> -----Original Message-----
> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> Sent: Wednesday, November 06, 2002 2:57 PM
> To: Lucene Users List
> Subject: Re: Several fields with the same name
> 
> 
> Looking at the source if looks like you can just call it multiple
> times
> until it returns null.
> 
> Otis
> 
> --- Rob Outar <routar@ideorlando.org> wrote:
> > Hello all,
> >
> > 	I have a relationship where for one key there are many values,
> > basically a
> > 1 to many relationship.  For example with the key = name, value =
> > bob, jim,
> > etc..
> >
> > 	When a client wants all the values that have been associated with
> > the field
> > name, how would I get that?  The javadoc for Document.get(String
> > name)
> > states:
> >
> > 		Returns the string value of the field with the given name if any
> > exist in
> > this document, or 		null. 	If multiple fields may exist with this
> > name, this
> > method returns the last added 		such 	added.
> >
> > 	I don't need the last field's value, I need all values associated
> > with that
> > field.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Rob
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> 
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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


Mime
View raw message