If you want to get "file.txt" out of "/documents/file.txt" simply cut of everything before the last "/":
String path = doc.get("path"); String name = path != null ? path.substring(path.lastIndexOf("/") + 1) : path; Otherwise, if you want to store only the name in the index, you will have to do something similar to the above when you create the document field in the indexing process. /Ronnie Citerar Mag Gam <[EMAIL PROTECTED]>: > Is it possible to get Document Name, instead of its entire path? > > Currently, i have something like this: > out.println (doc.get ("path")); // Which gives me /documents/file.txt > > Is it possible to get "file.txt" > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]