SOLR-1298 -- parsing ValueSource as DocTransformer

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1085644 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2011-03-26 04:52:39 +00:00
parent f54e1805de
commit b5f436d6ea
2 changed files with 4 additions and 10 deletions

View File

@ -44,7 +44,7 @@ public class ValueSourceAugmenter extends DocTransformer
@Override
public String getName()
{
return name;
return "function("+name+")";
}
@Override

View File

@ -260,16 +260,10 @@ public class ReturnFields
}
if (key==null) {
SolrParams localParams = parser.getLocalParams();
if (localParams != null) {
key = localParams.get("key");
}
if (key == null) {
// use the function name itself as the field name
key = sp.val.substring(start, sp.pos);
}
key = funcStr;
}
okFieldNames.add( key );
okFieldNames.add( funcStr );
augmenters.addTransformer( new ValueSourceAugmenter( key, parser, vs ) );
}
catch (ParseException e) {