Thanks...easy, I know how to do it that way. I've thought a bit more about why the protocol and host are not added into the index as part of the path and I think I understand why. I hope I understand it correctly.
-----Original Message----- From: Dror Matalon [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 November 2003 5:24 PM To: Lucene Users List Subject: Re: Advice needed on Indexing On Wed, Nov 26, 2003 at 05:12:14PM +1100, Justyna Lubkowski wrote: > Hi, > > I'm new to Lucene and have just started to familiarise myself with the API. > > I'm trying the web demo out, running IndexHTML. > > I'm wondering if it is possible to include the protocol and host as part of > the path which is put into the index. What is the simplest way to approach > this? > > At the moment my results display the url as > "/web/htdocs/test/apple/grannysmith/" > I need to display something like > "http://www.mysite.com/test/apple/grannysmith" This is more of a java/JSP than a Lucene question. Looking at the JSP code I see that it does String url = doc.get("url"); You then can do server = request.getServerName() to get the name of the server you're running on. And then just use standard string manipulations to create the path. You can also, when you create the index have go to /web/htdocs and index from there. That way doc.get("url") will not include /web/htdocs in the path. Regards, Dror > > Any advice on how to move in the right direction would be appreciated. > > Thanks - Justyna. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Dror Matalon Zapatec Inc 1700 MLK Way Berkeley, CA 94709 http://www.fastbuzz.com http://www.zapatec.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
