Also, the first several hits here provide the tricks to update the code to the latest API:

<http://www.lucidimagination.com/search/?q=lucene+in+action+examples+update > :)

        Erik


On Feb 19, 2009, at 10:41 AM, Seid Mohammed 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


---------------------------------------------------------------------
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