Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 70210 invoked from network); 23 Aug 2010 15:08:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 15:08:51 -0000 Received: (qmail 83300 invoked by uid 500); 23 Aug 2010 15:08:50 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 83109 invoked by uid 500); 23 Aug 2010 15:08:49 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 83102 invoked by uid 99); 23 Aug 2010 15:08:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 15:08:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 15:08:48 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7NF8RDA007697 for ; Mon, 23 Aug 2010 15:08:28 GMT Message-ID: <24678863.509461282576107684.JavaMail.jira@thor> Date: Mon, 23 Aug 2010 11:08:27 -0400 (EDT) From: "Ryan McKinley (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (SOLR-2079) Expose HttpServletRequest object from SolrQueryRequest object In-Reply-To: <29982466.508251282573638110.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org