mirror of https://github.com/apache/lucene.git
SOLR-7376 - adjusted RawValueTransformerFactoryimpl to use StorableField#stringValue
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1673731 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d71933415d
commit
06a1248a4d
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import org.apache.lucene.index.IndexableField;
|
import org.apache.lucene.index.IndexableField;
|
||||||
|
import org.apache.lucene.index.StorableField;
|
||||||
import org.apache.solr.common.SolrDocument;
|
import org.apache.solr.common.SolrDocument;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
import org.apache.solr.common.params.SolrParams;
|
import org.apache.solr.common.params.SolrParams;
|
||||||
|
@ -135,14 +136,14 @@ public class RawValueTransformerFactory extends TransformerFactory
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(String name, TextResponseWriter writer) throws IOException {
|
public void write(String name, TextResponseWriter writer) throws IOException {
|
||||||
// String str = null;
|
String str = null;
|
||||||
// if(val instanceof IndexableField) { // delays holding it in memory
|
if(val instanceof StorableField) { // delays holding it in memory
|
||||||
// str = ((IndexableField)val).stringValue();
|
str = ((StorableField)val).stringValue();
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// str = val.toString();
|
str = val.toString();
|
||||||
// }
|
}
|
||||||
writer.getWriter().write(val.toString());
|
writer.getWriter().write(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue