lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan Diwan" <hasan.di...@gmail.com>
Subject Re: Document Get question
Date Sun, 27 Aug 2006 05:39:42 GMT
On 24/08/06, Mag Gam <magawake@gmail.com> wrote:
> 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

doc.get("path").split("/")[doc.get("path").split("/").length - 1]

-- 
Cheers,
Hasan Diwan <hasan.diwan@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message