lucene-dev mailing list archives

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


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"

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

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

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:
>             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:
For additional commands, e-mail:

View raw message