You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2014/09/10 02:46:30 UTC
Re: Using def function in fl criteria,
: I'm trying to use a query with fl=name_UK,name_FRA,itemDesc:def(name_UK,name_FRA)
: As you can see, the itemDesc field (builded by solr) is truncated :
functions get their values from the FieldCache (or DocValues if you've
enabled them) so that they can be efficient across a lot of docs.
based on what you are getting back from the def() funcion, you almost
certainly have a fieldTYpe for name_UK that uses an analyzer that
tokenizes the field, so you're getting back one of the indexed terms.
you could theoretically index these fields again using something like
StrField or KeyworkTokenizerFactory and use that via the def() function --
but honestly that's going to be a lot less efficient then just letting
your client pick bewtween the two values, or writting your own
DocTransformer to conditionally rename/remove the stored field values you
don't want...
https://lucene.apache.org/solr/4_10_0/solr-core/org/apache/solr/response/transform/TransformerFactory.html
-Hoss
http://www.lucidworks.com/