issues with get path method in java lucene program -
issues with get path method in java lucene program -
i using lucene in java find rank documents against query i've found error in getpath method code:
 string directoryname = "doc50" ;         file folder = new file(directoryname);         file[] listoffiles = folder.listfiles();         (int = 0; < listoffiles.length; i++)        // loop read files doc50 folder...         {             if (listoffiles[i].isfile())                    //  status if current file of filetype...             {                  path path = filesystems.getdefault().getpath(directoryname, listoffiles[i].getname());                 string contents = new string(files.readallbytes(path), standardcharsets.utf_8); //read whole document in single string                  adddoc(documentindexer, contents, listoffiles[i].getname());     //add document indexed documents             }     error exception in thread "main" java.lang.error: unresolved compilation problem: method getpath(string, string[]) in type filesystem not applicable arguments (string, string)
please help me.
 java lucene 
 
  
Comments
Post a Comment