lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan Diwan" <hasan.di...@gmail.com>
Subject Re: Help needed
Date Fri, 23 Nov 2007 16:51:20 GMT
On 23/11/2007, Liaqat Ali <liaqatalimian@gmail.com> wrote:
> *Can not find symbol:   method Text (java.lang.String, java.lang.String)
> location: class org.apache.lucene.document.Field
> document.add(Field.Text("fieldname", text));
> *

If you're using Lucene 2.x.x, the static methods of the Field class
have gone away. I'd use the following in your case:
document.add(new Field("fieldname", text, Field.Store.YES,
Field.Index.TOKENIZED);
to do what you wish.
-- 
Cheers,
Hasan Diwan <hasan.diwan@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message