From 29109d47ffa201a914370f6e628c796dea4499f8 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Tue, 17 Nov 2009 15:21:17 +0000 Subject: [PATCH] add way to get literal string w/o DocValues, add missing override, remove unused name() git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@881333 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/search/function/LiteralValueSource.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/solr/search/function/LiteralValueSource.java b/src/java/org/apache/solr/search/function/LiteralValueSource.java index a00cd0d70bd..0c16a838d8c 100644 --- a/src/java/org/apache/solr/search/function/LiteralValueSource.java +++ b/src/java/org/apache/solr/search/function/LiteralValueSource.java @@ -27,13 +27,14 @@ import java.io.IOException; * **/ public class LiteralValueSource extends ValueSource { - protected String string; + protected final String string; public LiteralValueSource(String string) { this.string = string; } - protected String name() { - return "literal"; + /** returns the literal value */ + public String getValue() { + return string; } @Override @@ -52,6 +53,7 @@ public class LiteralValueSource extends ValueSource { }; } + @Override public String description() { return "literal(" + string + ")"; }