[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    RE: Advice needed on Indexing
From:       "Justyna Lubkowski" <j.lubkowski () BoM ! GOV ! AU>
Date:       2003-11-26 6:45:19
[Download RAW message or body]

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:dror@zapatec.com]
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: 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



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic