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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -