[
https://issues.apache.org/jira/browse/SOLR-2079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901430#action_12901430
]
Ryan McKinley commented on SOLR-2079:
-------------------------------------
Ah yes -- i remember wanting to do this a long time ago.
Hoss convinced me that it really is not a good idea -- SolrQueryRequest is
intentionally abstracted from HttpServletRequest -- adding it directly explodes
the various ways things could be passed around.
In my own code I subclass SolrDispatchFilter and attach whatever we need there:
{code:java}
@Override
protected final void execute( HttpServletRequest req, SolrRequestHandler
handler, SolrQueryRequest sreq, SolrQueryResponse rsp)
{
sreq.getContext().put( "IP", req.getRemoteAddr() );
super.execute(req, handler, sreq, rsp);
}
{code}
> Expose HttpServletRequest object from SolrQueryRequest object
> -------------------------------------------------------------
>
> Key: SOLR-2079
> URL: https://issues.apache.org/jira/browse/SOLR-2079
> Project: Solr
> Issue Type: Improvement
> Components: Response Writers, search
> Reporter: Chris A. Mattmann
> Fix For: 3.1
>
> Attachments: SOLR-2079.Quach.Mattmann.082310.patch.txt
>
>
> This patch adds the HttpServletRequest object to the SolrQueryRequest object.
> The HttpServletRequest object is needed to obtain the client's IP address for
> geotargetting, and is part of the patches from W. Quach and C. Mattmann.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]