Thanks for your reply. I am aware of the new API, but with the new API that you provided we lost the ability to "Store" the field as a string (the Value), but "Tokenize" it differently for Indexing, using a Reader.
Matthijs Bierman wrote: > > Hi, > > I would recommend downloading the 1.9.0 release for porting your code. > It will show you what's deprecated and the javadoc will show you the > proper way to do it. > What you would want with your field is: > > /** Constructs a String-valued Field that is tokenized and indexed, > and is stored in the index, for return with hits. The tokens are > generated from the reader */ > public static final Field(String name, String value) { > Field aField = new Field(name, value, Field.Store.NO, > Field.Index.TOKENIZED); > return aField; > } > > If you want to store the field change NO to YES, if you want to store > the field untokenized change TOKENIZED to UN_TOKENIZED. > > Cheers, > Matthijs > > ts01 wrote: >> Hi, >> >> With Lucene 1.4.3, we had used this constructor for Field. What is its >> equivalent in Lucene 2.2.0? >> >> /** Constructs a String-valued Field that is tokenized and indexed, >> and is stored in the index, for return with hits. The tokens are >> generated from the reader */ >> public static final Field Text(String name, String value, Reader >> reader) { >> Field aField = Text(name, value); >> aField.readerValue = reader; >> return aField; >> } >> >> Thanks >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Conversion-from-Lucene-1.4.3-API-to-2.2.0-API.-tf4958346.html#a14217744 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]