True, I guess I was thinking of things from a search-only
perspective when I claimed they were identical... But
you're absolutely right in that you can retrieve them in
order (assuming you stored them) by getFields.

Best
Erick

On Thu, Oct 9, 2008 at 10:29 PM, John Griffin <[EMAIL PROTECTED]>wrote:

> Kalani,
>
> They are put into the document as separate fields. That's why there are
> getFields() and deleteFields() methods on Document.
>
> John G.
>
> -----Original Message-----
> From: Kalani Ruwanpathirana [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 08, 2008 3:02 AM
> To: java-user@lucene.apache.org
> Subject: Re: Only last field indexed
>
> You are doing this kind of a thing?
>
> document.add(new Field("id", id1, Field.Store.YES, Field.Index.TOKENIZED));
> document.add(new Field("id", id2, Field.Store.YES, Field.Index.TOKENIZED));
>
> I doubt whether this is possible. What happen to the value id1 when the
> value id2 added to the same filed? merged or overridden?
> Just curious.
>
>
> Kalani.
>
> On Tue, Oct 7, 2008 at 11:53 PM, Erick Erickson
> <[EMAIL PROTECTED]>wrote:
>
> > Let's see the indexing code. It is perfectly reasonable to
> > add data to a field multiple times, so I suspect you're
> > doing something wrong.....
> >
> > What evidence do you have that it's only the last field that's
> > indexed?
> >
> > Best
> > Erick
> >
> > On Tue, Oct 7, 2008 at 1:28 PM, John Griffin <[EMAIL PROTECTED]
> > >wrote:
> >
> > > Guys,
> > >
> > > I'm adding multiple fields with the same name to a document as
> Store.YES,
> > > Indexed.TOKENIZED and it seems that only the last field entered is
> > indexed.
> > > I read about this somewhere her but now I can't find it, naturally. Is
> > > there
> > > a work around? does someone have a pointer to this discussion? Can
> > someone
> > > help?
> > >
> > > Thanks in advance.
> > >
> > > John G.
> > >
> >
>
>
>
> --
> Kalani Ruwanpathirana
> Department of Computer Science & Engineering
> University of Moratuwa
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to