Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0DAF7E93 for ; Wed, 7 Dec 2011 13:26:41 +0000 (UTC) Received: (qmail 21139 invoked by uid 500); 7 Dec 2011 13:26:38 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 21097 invoked by uid 500); 7 Dec 2011 13:26:38 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 21089 invoked by uid 99); 7 Dec 2011 13:26:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 13:26:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tech178@yoox.com designates 195.130.217.15 as permitted sender) Received: from [195.130.217.15] (HELO service92.mimecast.com) (195.130.217.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 13:26:29 +0000 Received: from Ymail11blq.yoox.net (relay3.yoox.com [81.208.106.4]) (Using TLS) by service92.mimecast.com; Wed, 07 Dec 2011 13:26:08 +0000 Received: from YDAG01BLQ.yoox.net (10.127.103.77) by Ymail11blq.yoox.net (10.127.103.71) with Microsoft SMTP Server (TLS) id 14.1.218.12; Wed, 7 Dec 2011 14:26:05 +0100 Received: from YMAIL13BLQ.yoox.net ([169.254.2.17]) by YDAG01BLQ.yoox.net ([fe80::c44e:3f6e:1ea:c931%18]) with mapi id 14.01.0255.000; Wed, 7 Dec 2011 14:26:05 +0100 From: Finotti Simone To: "solr-user@lucene.apache.org" Subject: Re: Solr response writer Thread-Topic: Solr response writer Thread-Index: Acy01h2IeTWIkFwNQX+SP0v4sYnPvwAA3EMAAAI3A9Y= Date: Wed, 7 Dec 2011 13:26:04 +0000 Message-ID: References: , In-Reply-To: Accept-Language: it-IT, en-US Content-Language: it-IT X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.127.100.64] MIME-Version: 1.0 X-MC-Unique: 111120713260802601 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org That's the scenario:=0AI have an XML that maps words W to URLs; when a sear= ch request is issued by my web client, a query will be issued to my Solr ap= plication. If, after stemming, the query matches any in W, the client must = be redirected to the associated URL.=0A=0AI agree that it should be handled= outside, but we are currently on progress of migrating from Endeca, and it= has a feature that allow this scenario. For this reason, my boss asked if = it was somehow possible to leave that functionality in the search engine.= =0A=0Athanks again=0A=0A________________________________________=0AInizio: = Erik Hatcher [erik.hatcher@gmail.com]=0AInviato: mercoled=EC 7 dicembre 201= 1 14.12=0AFine: solr-user@lucene.apache.org=0AOggetto: Re: Solr response wr= iter=0A=0AFirst, could you tell us more about your use case? Why do you w= ant to change the response code? HTTP 307 =3D Temporary redirect - where = are you going to redirect? Sounds like something best handled outside of S= olr.=0A=0AIf you went down the route of creating your own custom response w= riter, then you'd be locked into a single format (XML, or JSON, or which ev= er that you subclassed)=0A=0A=0AOn Dec 7, 2011, at 06:48 , Finotti Simone w= rote:=0A=0A> Hello,=0A> I need to change the HTTP result code of the query = result if some conditions are met.=0A>=0A> Analyzing the flow of execution = of Solr query process, it seems to me that the "place" that fits better is = the QueryResponseWriter. Anyway I didn't found a way to change the HTTP req= uest layout (I need to set 307 instead of 200), so I wonder if it's possibl= e at all with the Solr (v 3.4) plugin mechanism actually provided.=0A>=0A> = Any insight would be greatly appreciated J=0A>=0A> Thanks=0A> S=0A=0A=0A=0A