Field.Text()  was deprecated in Lucene 1.9 and then removed in 2.0.
The book examples were not updated for 2.0 yet.

You should now use Field(String, String, Field.Store, Field.Index).
To have the same behavior as old Field.Text use: Field(name, value,
Field.Store.YES, Field.Index.TOKENIZED).

For other release issues - see the FAQ entry
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-d09fdfc8a6335eab4e3f3dc8ac41a40a3666318e

Regards,
Doron

"Serhiy Polyakov" <[EMAIL PROTECTED]> wrote on 10/10/2006 11:13:21:

> Hi,
>
> I started to study Lucene following the book Lucene in Action.
>
> I am trying to compile book examples downloaded from the book site:
> http://www.manning.com/hatcher2/
>
> When I am trying to compile first example (Indexer.java) it gives me
> the following error:
>
> LuceneInAction\src\lia\meetlucene\Indexer.java:80: cannot find symbol
> symbol  : method Text(java.lang.String,java.io.FileReader)
> location: class org.apache.lucene.document.Field
>     doc.add(Field.Text("contents", new FileReader(f)));
>
> I know that file lucene-core-2.0.0.jar is in CLASSPATH and other classes
like
> org.apache.lucene.index.IndexWriter are working OK. The only class I
> am having problem with is org.apache.lucene.document.Field;
>
> Can you suggest something?
>
> Thanks,
> Serhiy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to