mirror of https://github.com/apache/lucene.git
SOLR-11947: Rollback inadvertent code change during documentation updates.
This commit is contained in:
parent
1ed4e226ac
commit
e69c614cf6
|
@ -31,12 +31,10 @@ public class FieldValueEvaluator extends SourceEvaluator {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String fieldName;
|
||||
private boolean literal;
|
||||
|
||||
public FieldValueEvaluator(String fieldName) {
|
||||
if(fieldName.startsWith("\"") && fieldName.endsWith("\"") && fieldName.length() > 1){
|
||||
if(fieldName.startsWith("'") && fieldName.endsWith("'") && fieldName.length() > 1){
|
||||
fieldName = fieldName.substring(1, fieldName.length() - 1);
|
||||
literal = true;
|
||||
}
|
||||
|
||||
this.fieldName = fieldName;
|
||||
|
@ -44,10 +42,6 @@ public class FieldValueEvaluator extends SourceEvaluator {
|
|||
|
||||
@Override
|
||||
public Object evaluate(Tuple tuple) throws IOException {
|
||||
if(literal) {
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
Object value = tuple.get(fieldName);
|
||||
|
||||
// This is somewhat radical.
|
||||
|
@ -90,6 +84,10 @@ public class FieldValueEvaluator extends SourceEvaluator {
|
|||
}
|
||||
}
|
||||
|
||||
if(value == null) {
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue