On Sat, Jun 6, 2009 at 2:35 AM, Manepalli,
Kalyan<kalyan.manepa...@orbitz.com> wrote:
> Otis,
>        I like the idea of using the as field parameter. As per your earlier 
> comments, I implemented this by modifying the JsonResponseWriter by 
> substituting the actual fieldname by the alias passed as part of request 
> Parameter.
The stored fields come into picture only in the response writer . So
that is the place where we can implement this
> I think the actual implementation would be at a much higher level than the 
> response writer.
> Thanks,
> Kalyan Manepalli
>
> -----Original Message-----
> From: Otis Gospodnetic [mailto:otis_gospodne...@yahoo.com]
> Sent: Friday, June 05, 2009 9:11 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Customizing results
>
>
> Funny, I was just thinking about field aliases the other day.  I personally 
> never needed then, but I can see how they could be handy for both searching 
> and writing out the response.  On the other hand, isn't this fairly easy to 
> implement with a field2field mapping in the search app itself?
>
>  Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
>> From: Fergus McMenemie <fer...@twig.me.uk>
>> To: solr-user@lucene.apache.org
>> Sent: Friday, June 5, 2009 2:53:38 AM
>> Subject: Re: Customizing results
>>
>> >Generally a good idea, but be prepared to entertain requests that should
>> >also ask you to be able to perform the query using those aliases. I mean
>> >when you talk about something "similar" to aliases in SQL, those aliases can
>> >be used in SQL scripts in the where clause too.
>> >
>> >Cheers
>> >Avlesh
>>
>> I am using shards to provide access to several underlying indexes which
>> have drastically different schema. Each different shard has its own
>> dedicated search application built around it. However I also want to
>> implement a global search that performs a more limited but general purpose
>> search across all shards. I find I am doing lots of copyfields to get a
>> set of fields that can be used for the general purpose search, I feel sure
>> that this is redundant and that an aliasfields feature would be very
>> useful.
>>
>> For example one index has a "title" field another has a "subject"
>> field a third has a "placename" field. My general purpose or
>> global search treats these as as title. An aliasfields feature would
>> be more efficient and cleaner than using copyfields.
>>
>> Fergus.
>>
>> >
>> >2009/6/5 Noble Paul ?????? 青�ヒウヒ
>> >
>> >> Hi Otis,
>> >>
>> >> is it a good idea to provide as aliasing feature for Solr similar to
>> >> the  SQL 'as'
>> >>
>> >> in SQL we can do
>> >>
>> >> select location_da_dk as location
>> >>
>> >> Solr may have
>> >>
>> >> fl.alias=location_da_dk:location
>> >>
>> >> --Noble
>> >>
>> >>
>> >>
>> >>
>> >> On Fri, Jun 5, 2009 at 3:10 AM, Otis Gospodnetic
>> >> wrote:
>> >> >
>> >> > Aha, so you really want to rename the field at response time?  I wonder
>> >> if this is something that could be done with (or should be added to)
>> >> response writers.  That's where I'd go look first.
>> >> >
>> >> >  Otis
>> >> > --
>> >> > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>> >> >
>> >> >
>> >> >
>> >> > ----- Original Message ----
>> >> >> From: "Manepalli, Kalyan"
>> >> >> To: "solr-user@lucene.apache.org"
>> >> >> Sent: Thursday, June 4, 2009 5:30:40 PM
>> >> >> Subject: RE: Customizing results
>> >> >>
>> >> >> Otis,
>> >> >>     With that solution, the client has to accept all type location
>> >> fields
>> >> >> (location_de_de, location_it_it). I want to copy the result into
>> >> "location"
>> >> >> field, so that client can just accept location.
>> >> >>
>> >> >> Thanks,
>> >> >> Kalyan Manepalli
>> >> >> -----Original Message-----
>> >> >> From: Otis Gospodnetic [mailto:otis_gospodne...@yahoo.com]
>> >> >> Sent: Thursday, June 04, 2009 4:16 PM
>> >> >> To: solr-user@lucene.apache.org
>> >> >> Subject: Re: Customizing results
>> >> >>
>> >> >>
>> >> >> Hello,
>> >> >>
>> >> >> If you know what language the user specified (or is associated with),
>> >> then you
>> >> >> just have to ensure the "fl" URL parameter contain that field (and any
>> >> other
>> >> >> fields you want returned).  So if the language/locale is de_de, then
>> >> make sure
>> >> >> the request has fl=location_de_de,another_field,another_field, and not,
>> >> for
>> >> >> example location_it_it
>> >> >>
>> >> >> Otis
>> >> >> --
>> >> >> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>> >> >>
>> >> >>
>> >> >>
>> >> >> ----- Original Message ----
>> >> >> > From: "Manepalli, Kalyan"
>> >> >> > To: "solr-user@lucene.apache.org"
>> >> >> > Sent: Thursday, June 4, 2009 12:36:30 PM
>> >> >> > Subject: Customizing results
>> >> >> >
>> >> >> > Hi,
>> >> >> >             I am trying to customize the response that I receive from
>> >> Solr. In
>> >> >> > the index I have multiple fields that contain the same data in
>> >> different
>> >> >> > language.
>> >> >> > At the query time client specifies the language. Based on this param,
>> >> I want
>> >> >> to
>> >> >> > return the value, copied into a different field.
>> >> >> > Eg:
>> >> >> > Lubang, Filippinerne
>> >> >> > Lubang, Philippinen
>> >> >> > Lubang, Philippines
>> >> >> > Lubang, Filipinas
>> >> >> >
>> >> >> > If the user specifies language as de_de, then I want to return the
>> >> result as
>> >> >> > Lubang, Philippinen
>> >> >> >
>> >> >> > What is the most optimal way of doing this?
>> >> >> > Any suggestions on this will be helpful
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Kalyan Manepalli
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> -----------------------------------------------------
>> >> Noble Paul | Principal Engineer| AOL | http://aol.com
>> >>
>
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Reply via email to