lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dror Matalon <d...@zapatec.com>
Subject Re: Advice needed on Indexing
Date Wed, 26 Nov 2003 06:24:26 GMT
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: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

-- 
Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com

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


Mime
View raw message