I'll just allow the user to pass in the port via a param for now.

Thx!

On Tue, Sep 29, 2009 at 4:13 PM, Mark Miller <markrmil...@gmail.com> wrote:
> Unfortunately, because they don't want you counting on access to the
> servlet request due to embedded Solr and what not, to get that type of
> info you have to override and use your own SolrDispatchFilter:
>
>  protected void execute( HttpServletRequest req, SolrRequestHandler
> handler, SolrQueryRequest sreq, SolrQueryResponse rsp) {
>
>    // a custom filter could add more stuff to the request before
> passing it on.
>    // for example: sreq.getContext().put( "HttpServletRequest", req );
>
>
> Jason Rutherglen wrote:
>> Yah, I just found it, and was going to reply to my own message with
>> that exactly!
>>
>> My next question is how to get the port the request was on?
>>
>> On Tue, Sep 29, 2009 at 4:01 PM, Mark Miller <markrmil...@gmail.com> wrote:
>>
>>> Jason Rutherglen wrote:
>>>
>>>> Howdy,
>>>>
>>>> I was wondering what the best way is to access the current
>>>> instance of CoreContainer? It seems like the only way to do this
>>>> is to extend CoreAdminHandler. I'd prefer a way via a way to
>>>> access CoreContainer from SolrCore or RequestHandlerBase.
>>>>
>>>> The use case is, I want to implement a SearchHandler that by
>>>> default, searches all of the local cores by automatically
>>>> inserting a shards param of the form
>>>> "localhost:8080/solr/core0,localhost:8080/solr/core1" into the
>>>> request. I'll be dynamically creating and unloading cores and so
>>>> do not want to edit solrconfig each time a core changes.
>>>>
>>>> Thanks!
>>>>
>>>>
>>> SolrCore.getCoreDescriptor().getCoreContainer()
>>>
>>> --
>>> - Mark
>>>
>>> http://www.lucidimagination.com
>>>
>>>
>>>
>>>
>>>
>
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
>

Reply via email to