mirror of https://github.com/apache/lucene.git
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:
parent
f54e1805de
commit
b5f436d6ea
|
@ -44,7 +44,7 @@ public class ValueSourceAugmenter extends DocTransformer
|
|||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return "function("+name+")";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -260,16 +260,10 @@ public class ReturnFields
|
|||
}
|
||||
|
||||
if (key==null) {
|
||||
SolrParams localParams = parser.getLocalParams();
|
||||
if (localParams != null) {
|
||||
key = localParams.get("key");
|
||||
key = funcStr;
|
||||
}
|
||||
if (key == null) {
|
||||
// use the function name itself as the field name
|
||||
key = sp.val.substring(start, sp.pos);
|
||||
}
|
||||
}
|
||||
|
||||
okFieldNames.add( key );
|
||||
okFieldNames.add( funcStr );
|
||||
augmenters.addTransformer( new ValueSourceAugmenter( key, parser, vs ) );
|
||||
}
|
||||
catch (ParseException e) {
|
||||
|
|
Loading…
Reference in New Issue