LIA was written for a pretty early version of Lucene, if you're using a
recent
release you need to modify the code to be compliant with that version.

Or install an older release of Lucene.

Erick

On Thu, Feb 19, 2009 at 10:41 AM, Seid Mohammed <seidy...@gmail.com> wrote:

> I am using netbeans on windows to test lucene.
> I have added all the lib files from the /lib directory to my project
> library.
> down the end of Indexer.java program, it states the Field.Text method
> is not available
> the error message is as follows
>
> ---------------------------------------------------------------------------------------------------------------
>
> C:\backup\msc\year2sem1\JavSrc\Lucene\src\Indexer.java:18: duplicate
> class: lia.meetlucene.Indexer
> public class Indexer {
>
> C:\backup\msc\luceninaction\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)));
>
> C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java:81:
> cannot find symbol
> symbol  : method Keyword(java.lang.String,java.lang.String)
> location: class org.apache.lucene.document.Field
>    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
> Note:
> C:\backup\msc\luceninaction\LuceneInAction\src\lia\meetlucene\Indexer.java
> uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> 3 errors
> BUILD FAILED (total time: 2 seconds)
>
> -----------------------------------------------------------------------------------------------------------------------------------
> what is wrong?
> it underlines in red for the folowing code....
> =========================================================
>    Document doc = new Document();
>    doc.add(Field.Text("contents", new FileReader(f)));
>    doc.add(Field.Keyword("filename", f.getCanonicalPath()));
>    writer.addDocument(doc);
> ===================================================
>
> seid m
> --
> "RABI ZIDNI ILMA"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

Reply via email to