I got your and Michael's point. Indeed, I'm not very skilled in web devolpment 
so there may be something that I'm missing. Anyway, Endeca does something like 
this:

1. accept a query
2. does the stemming;
3. check if the result of the step 2. matches one of the redirectable words. If 
so, returns an URL, otherwise returns the regular matching documents (our 
products' description).

Do you think that in Solr I will be able to replicate this behaviour without 
writing a custom plugin (request handler, response writer, etc)? Maybe I'm a 
little dense, but I fail to see how it would be possible... 

S

________________________________________
Inizio: Erik Hatcher [erik.hatc...@gmail.com]
Inviato: mercoledì 7 dicembre 2011 14.40
Fine: solr-user@lucene.apache.org
Oggetto: Re: Solr response writer

Either way (Endeca's 307, which seems crazy to me) or simply plucking off a 
"url" field from the first document returned in a search request... you're 
getting a URL back to your client and then using that URL to further send back 
to a users browser, I presume.  I personally wouldn't implement it with a 
custom response writer, just get the URL from the standard Solr response.

        Erik

On Dec 7, 2011, at 08:26 , Finotti Simone wrote:

> That's the scenario:
> I have an XML that maps words W to URLs; when a search request is issued by 
> my web client, a query will be issued to my Solr application. If, after 
> stemming, the query matches any in W, the client must be redirected to the 
> associated URL.
>
> I 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.
>
> thanks again
>
> ________________________________________
> Inizio: Erik Hatcher [erik.hatc...@gmail.com]
> Inviato: mercoledì 7 dicembre 2011 14.12
> Fine: solr-user@lucene.apache.org
> Oggetto: Re: Solr response writer
>
> First, could you tell us more about your use case?   Why do you want to 
> change the response code?   HTTP 307 = Temporary redirect - where are you 
> going to redirect?  Sounds like something best handled outside of Solr.
>
> If you went down the route of creating your own custom response writer, then 
> you'd be locked into a single format (XML, or JSON, or which ever that you 
> subclassed)
>
>
> On Dec 7, 2011, at 06:48 , Finotti Simone wrote:
>
>> Hello,
>> I need to change the HTTP result code of the query result if some conditions 
>> are met.
>>
>> 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 request layout (I need to set 307 instead of 
>> 200), so I wonder if it's possible at all with the Solr (v 3.4) plugin 
>> mechanism actually provided.
>>
>> Any insight would be greatly appreciated J
>>
>> Thanks
>> S
>
>
>
>
>





Reply via email to