Corrected the second line.. Please refer the Javadocs for more help.
document.add(new Field("path",textFiles[i].getPath(), Field.Store.NO,
Field.Index.ANALYZED));
Regards
Ganesh
- Original Message -
From: "nitin gopi"
To:
Sent: Friday, March 06, 2009 2:27 P
hi Ganesh,
the program still gives error in the second line . it says that *cannot
find symbol * .I think that we are initializing the object of Field class
two times, that is why we are getting error.
document.add(new Field("content",textReader));
document.add(new Field("path",textFiles[i].getP
Hello gopi,
My comments.
if(textFiles[i].isFile() > textFiles[i].getName().endsWith(".txt")){
&& should be used.
*document.add(Field.Text("content",textReader));
document.add(new Field("content", textReader);
document.add(Field.Text("path",textFiles[i].getPath()));*
document.ad