You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by saikrishna venkata pendyala <pv...@gmail.com> on 2006/08/22 12:32:56 UTC
Re: Help on Fields
Hai,
Can I store multiple values for same Field, with same field name for a
given document.
I mean is this operation permitted
doc.add(Field.text("title","T1"))
doc.add(Field.text("title","T2"))
doc.add(Field.text("title","T3"))
So when I ask for title it should return all the titles.
regards,
Saikrishna
Re: Help on Fields
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Yes, no problem. Except there is no Field.text() method, so you'll
want to use the Field constructor to make the fields at least stored
to get them back, but most likely you'd also want them indexed and
tokenized too.
Erik
On Aug 22, 2006, at 6:32 AM, saikrishna venkata pendyala wrote:
> Hai,
> Can I store multiple values for same Field, with same field
> name for a
> given document.
>
> I mean is this operation permitted
>
> doc.add(Field.text("title","T1"))
> doc.add(Field.text("title","T2"))
> doc.add(Field.text("title","T3"))
>
> So when I ask for title it should return all the titles.
>
> regards,
> Saikrishna
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org