On Fri, Jun 5, 2009 at 10:20 AM, Avlesh Singh <avl...@gmail.com> wrote: > 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. I guess that can be a separate issue. But this can be implemented as a post processing step. At the ResponseWriter level.
The current problem is that there are too many response writers and we will have to change and test them all > > Cheers > Avlesh > > 2009/6/5 Noble Paul നോബിള് नोब्ळ् <noble.p...@corp.aol.com> > >> 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 >> <otis_gospodne...@yahoo.com> 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" <kalyan.manepa...@orbitz.com> >> >> To: "solr-user@lucene.apache.org" <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