Re: Does Solr know what host and port it is running on?

2009-06-08 Thread Noble Paul നോബിള്‍ नोब्ळ्
how about putting it in the
 

tag?


On Mon, Jun 8, 2009 at 6:39 PM, Grant Ingersoll wrote:
> All good points, Paul.  I've settled on putting it into the config, as much
> as I don't want to.
>
>
> On Jun 6, 2009, at 4:59 PM, Paul Libbrecht wrote:
>
>> It is common knowledge that a web-application cannot know it's port and
>> host-name:
>> - many possible cnames to host-name
>> - potential tunnels
>> - most important and most used: proxies, typically an apache mod_proxy or
>> mod_webapp on a port different than the servlet container port.
>>
>>
>> Le 06-juin-09 à 09:38, Noble Paul നോബിള്‍ नोब्ळ् a écrit :
>>>
>>> can it be added into the solrconfig.xml or solr.xml ?
>>
>> My experience is that it is simple as that: you have to configure
>> something which, in ActiveMath, we have called the "advertizedURL".
>>
>> Making it non-configurable really often creates issues and requires the
>> deployer to dig deep into the servlet container configuration (I never was
>> fully able with mod_proxy and tomcat). Defaulting to something such as
>> request.getServerPort etc is probably right though.
>>
>> hope it helps.
>>
>> paul
>>
>>> On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
>>> Mangar wrote:
>>>>
>>>> On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll 
>>>> wrote:
>>>>
>>>>> Does Solr know what host and port it is running on and, if so, how do I
>>>>> get
>>>>> access to it programmatically?  I feel like I'm missing something
>>>>> obvious.
>>>>>
>>>>
>>>> No, it does not. You can only get this on the first request.
>>>>
>>>> There's an issue open at https://issues.apache.org/jira/browse/SOLR-727
>>>>
>
> --
> Grant Ingersoll
> http://www.lucidimagination.com/
>
> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using
> Solr/Lucene:
> http://www.lucidimagination.com/search
>
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: Does Solr know what host and port it is running on?

2009-06-08 Thread Grant Ingersoll
All good points, Paul.  I've settled on putting it into the config, as  
much as I don't want to.



On Jun 6, 2009, at 4:59 PM, Paul Libbrecht wrote:

It is common knowledge that a web-application cannot know it's port  
and host-name:

- many possible cnames to host-name
- potential tunnels
- most important and most used: proxies, typically an apache  
mod_proxy or mod_webapp on a port different than the servlet  
container port.



Le 06-juin-09 à 09:38, Noble Paul നോബിള്‍  
नोब्ळ् a écrit :

can it be added into the solrconfig.xml or solr.xml ?


My experience is that it is simple as that: you have to configure  
something which, in ActiveMath, we have called the "advertizedURL".


Making it non-configurable really often creates issues and requires  
the deployer to dig deep into the servlet container configuration (I  
never was fully able with mod_proxy and tomcat). Defaulting to  
something such as request.getServerPort etc is probably right though.


hope it helps.

paul


On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
Mangar wrote:
On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll  
 wrote:


Does Solr know what host and port it is running on and, if so,  
how do I get
access to it programmatically?  I feel like I'm missing something  
obvious.




No, it does not. You can only get this on the first request.

There's an issue open at https://issues.apache.org/jira/browse/SOLR-727



--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: Does Solr know what host and port it is running on?

2009-06-06 Thread Paul Libbrecht
It is common knowledge that a web-application cannot know it's port  
and host-name:

- many possible cnames to host-name
- potential tunnels
- most important and most used: proxies, typically an apache mod_proxy  
or mod_webapp on a port different than the servlet container port.



Le 06-juin-09 à 09:38, Noble Paul നോബിള്‍  
नोब्ळ् a écrit :

can it be added into the solrconfig.xml or solr.xml ?


My experience is that it is simple as that: you have to configure  
something which, in ActiveMath, we have called the "advertizedURL".


Making it non-configurable really often creates issues and requires  
the deployer to dig deep into the servlet container configuration (I  
never was fully able with mod_proxy and tomcat). Defaulting to  
something such as request.getServerPort etc is probably right though.


hope it helps.

paul


On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
Mangar wrote:
On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll  
 wrote:


Does Solr know what host and port it is running on and, if so, how  
do I get
access to it programmatically?  I feel like I'm missing something  
obvious.




No, it does not. You can only get this on the first request.

There's an issue open at https://issues.apache.org/jira/browse/SOLR-727



smime.p7s
Description: S/MIME cryptographic signature


Re: Does Solr know what host and port it is running on?

2009-06-06 Thread Yonik Seeley
On Sat, Jun 6, 2009 at 11:48 AM, Grant Ingersoll  wrote:
> Seems like I might be able to get at it by having the Servlet add it onto
> something that is available like the core or the config.

Yep, as long as it's optional (Solr could always run in embedded more,
or in a different type of container).
Look at _info.jsp in the admin pages.

  int port = request.getServerPort();

req.getContextPath() is currently added to the Context though... not
sure off hand if that has the port or not, but it does seem like one
would often want the whole URL  (like http://localhost:8983/solr)

-Yonik
http://www.lucidimagination.com


Re: Does Solr know what host and port it is running on?

2009-06-06 Thread Grant Ingersoll


On Jun 6, 2009, at 3:38 AM, Noble Paul നോബിള്‍  
नोब्ळ् wrote:



can it be added into the solrconfig.xml or solr.xml ?


Yes, but for what I'm working on, I'd rather not have to do it.

Seems like I might be able to get at it by having the Servlet add it  
onto something that is available like the core or the config.


I'll look into it.






On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
Mangar wrote:
On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll  
 wrote:


Does Solr know what host and port it is running on and, if so, how  
do I get
access to it programmatically?  I feel like I'm missing something  
obvious.




No, it does not. You can only get this on the first request.

There's an issue open at https://issues.apache.org/jira/browse/SOLR-727

--
Regards,
Shalin Shekhar Mangar.





--
-
Noble Paul | Principal Engineer| AOL | http://aol.com





Re: Does Solr know what host and port it is running on?

2009-06-06 Thread Noble Paul നോബിള്‍ नोब्ळ्
can it be added into the solrconfig.xml or solr.xml ?

On Sat, Jun 6, 2009 at 10:55 AM, Shalin Shekhar
Mangar wrote:
> On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll  wrote:
>
>> Does Solr know what host and port it is running on and, if so, how do I get
>> access to it programmatically?  I feel like I'm missing something obvious.
>>
>
> No, it does not. You can only get this on the first request.
>
> There's an issue open at https://issues.apache.org/jira/browse/SOLR-727
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: Does Solr know what host and port it is running on?

2009-06-05 Thread Shalin Shekhar Mangar
On Sat, Jun 6, 2009 at 9:58 AM, Grant Ingersoll  wrote:

> Does Solr know what host and port it is running on and, if so, how do I get
> access to it programmatically?  I feel like I'm missing something obvious.
>

No, it does not. You can only get this on the first request.

There's an issue open at https://issues.apache.org/jira/browse/SOLR-727

-- 
Regards,
Shalin Shekhar Mangar.


Re: Does Solr know what host and port it is running on?

2009-06-05 Thread Grant Ingersoll
BTW, I mean when it starts up, as in during an inform(SolrCore) time,  
not the more obvious time when requests are coming in.


-Grant

On Jun 6, 2009, at 12:28 AM, Grant Ingersoll wrote:

Does Solr know what host and port it is running on and, if so, how  
do I get access to it programmatically?  I feel like I'm missing  
something obvious.


Thanks,
Grant




Does Solr know what host and port it is running on?

2009-06-05 Thread Grant Ingersoll
Does Solr know what host and port it is running on and, if so, how do  
I get access to it programmatically?  I feel like I'm missing  
something obvious.


Thanks,
Grant