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 org.apache.lucene.index.IndexableField;
|
||||
import org.apache.lucene.index.StorableField;
|
||||
import org.apache.solr.common.SolrDocument;
|
||||
import org.apache.solr.common.params.CommonParams;
|
||||
import org.apache.solr.common.params.SolrParams;
|
||||
|
@ -135,14 +136,14 @@ public class RawValueTransformerFactory extends TransformerFactory
|
|||
|
||||
@Override
|
||||
public void write(String name, TextResponseWriter writer) throws IOException {
|
||||
// String str = null;
|
||||
// if(val instanceof IndexableField) { // delays holding it in memory
|
||||
// str = ((IndexableField)val).stringValue();
|
||||
// }
|
||||
// else {
|
||||
// str = val.toString();
|
||||
// }
|
||||
writer.getWriter().write(val.toString());
|
||||
String str = null;
|
||||
if(val instanceof StorableField) { // delays holding it in memory
|
||||
str = ((StorableField)val).stringValue();
|
||||
}
|
||||
else {
|
||||
str = val.toString();
|
||||
}
|
||||
writer.getWriter().write(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue