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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -