lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit <amit.hanchinam...@gmail.com>
Subject Re: Cannot get Field.Text to work
Date Tue, 10 Jul 2007 10:14:11 GMT
Hi Andy,

Thanks for the example, i tried it and it works like a charm :)
I will explore more of Lucene on my own.

Amit


On 7/10/07, Liu_Andy2@emc.com <Liu_Andy2@emc.com> wrote:
>
> You can reference org.apache.lucene.document.Field class. It should be
> similar as:
> ontactDocument.add(new Field("name", contact.getName(),Field.Store.YES,
> Field.Index.TOKENIZED));
>
> Andy
>
>
> -----Original Message-----
> From: Amit [mailto:amit.hanchinamani@gmail.com]
> Sent: Tuesday, July 10, 2007 6:00 PM
> To: java-user@lucene.apache.org
> Subject: Re: Cannot get Field.Text to work
>
> Hi Otis,
>
> Thanks for the reply. I didn't know that as all the examples on Lucene
> still
> use the old approach.
> I had a look at the API  and it does not seem to provide any new methods
> as
> a substitute for Field.Text.
> Can you give a small example just how to add name-value pair to the
> document.
> Thanks
>
> Amit
>
>
> On 7/10/07, Otis Gospodnetic <otis_gospodnetic@yahoo.com> wrote:
> >
> > Amit,
> >
> > Field.Text method is long gone from Lucene.  I think that was in
> version
> > 1.4.3 of Lucene, maybe 1.9*, but we are in 2.* now.
> > The place to look at the new Field API is here:
> >
> >
> http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/document/Field
> .html
> >
> > Otis
> > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> > Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share
> >
> > ----- Original Message ----
> > From: Amit <amit.hanchinamani@gmail.com>
> > To: java-user@lucene.apache.org
> > Sent: Monday, July 9, 2007 10:41:27 PM
> > Subject: Cannot get Field.Text to work
> >
> > Hi
> >
> > I am new to Lucene and trying out the example code. But when I try to
> > insert
> > values using Field.Text the compiler does not recognize the Text as a
> > method
> > of Field. The code looks like this
> >
> > contactDocument.add(Field.Text("name", contact.getName()));
> >
> > I wanted to know if the version 2.2 does not have this method anymore,
> or
> > do
> > I have to access it in another way.
> > Any help appreciated.
> >
> >
> > Regards,
> >
> > Amit
> >
> >
> >
> >
> >
> > <a href="http://www.spreadfirefox.com/?q=affiliates&id=111787&t=1">Get
> > Firefox!</a>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message