lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: return only sorted Field, but with a different Field Name
Date Wed, 12 Mar 2008 21:55:41 GMT

: > there is nothing like this in solr right now, it doesn't seem like something
: > that should be odne in solr, as it would be a simple translation that could
: > be done via an XSLT or some client layer code.

: It may be more work then it is worth, but I would like to see something
: comparable to the SQL 'AS' syntax:
: 
:  &fl=162_sortable_s as SortedField,name,id
: 
: This would be good because it solves the problem for non XML based responses
: also.

But regardless of the format, If the client is the one saying "ugly_fieldname 
AS pretty_fieldname" then why not let the client do the translation?

I can see having server side configuration to "hide" the real field names 
from clients ( http://wiki.apache.org/solr/FieldAliasesAndGlobsInParams )  
I just dont' see the benefit in having the client ask the server to do 
something the client can do just as easily.

If, however, some of then ideas from that FieldAliasesAndGlobsInParams 
wiki were implemented, then we probably would need someway to configure 
generic fieldname renaming in the response ... if you've got server 
configuration that maps pretty_fieldname to ugly_fieldname for the 
purposes of sorting you need to ensure that the users can see 
pretty_fieldname in the response (hmm, the sort field could probably be 
handled as a special case, just like score field).  Likewise if you have 
server config to translate "fl=pretty1,pretty2,name,nice*" to 
"fl=uglyA,uglyB,name,text_*" then you need to make sure the do the reverse 
translation when output the stored field values for uglyA, uglyB and the 
text_ fields (which could get complicated when dealing with regex based 
field mappings ... i guess we could just require the solr admin to 
cofigure both regex if they want both the param translation and the 
response translation)


-Hoss


Mime
View raw message