lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] Commented: (SOLR-2079) Expose HttpServletRequest object from SolrQueryRequest object
Date Wed, 25 Aug 2010 09:42:22 GMT

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


Mime
View raw message