[ 
https://issues.apache.org/jira/browse/SOLR-2079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902359#action_12902359
 ] 

Jan Høydahl commented on SOLR-2079:
-----------------------------------

I have been using SolrParams to convey metadata from frontends to middleware 
layer, and I think it has worked really well. In addition, you get it included 
in the query logs!
As for load balancers, most have an option to convey the client's IP in the 
"X-Forwarded-For" header.

What if the dispatchFilter adds all HTTP headers to the SolrQueryRequest 
context. Then we could map explicitly in requestHandler config how to use them:

{code:xml}
<lst name="invariants">
    <str name="_http_remote-ip">$HTTP_HEADERS(X-Forwarded-For, 
Remote-Address)</str>
</lst>
{code}

This would mean that if HTTP header X-Forwarded-For exists in the context, it 
will be mapped to param _http_remote-ip, if not, it will use Remote-Address. In 
this way each application can choose whether to "pollute" the SolrParams with 
headers or not, choose naming as well as whether it should be invariant or 
default.

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to