From 51ec9c1f447d7185a48b5cbd7114c339f7980da3 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 26 Dec 2014 18:23:26 +0100 Subject: [PATCH] fix "null" title in response writer for documents with multivalued title --- .../cora/federate/solr/responsewriter/HTMLResponseWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/cora/federate/solr/responsewriter/HTMLResponseWriter.java b/source/net/yacy/cora/federate/solr/responsewriter/HTMLResponseWriter.java index c3bf84719..3b2d5128d 100644 --- a/source/net/yacy/cora/federate/solr/responsewriter/HTMLResponseWriter.java +++ b/source/net/yacy/cora/federate/solr/responsewriter/HTMLResponseWriter.java @@ -127,8 +127,8 @@ public class HTMLResponseWriter implements QueryResponseWriter { int id = iterator.nextDoc(); Document doc = searcher.doc(id, DEFAULT_FIELD_LIST); LinkedHashMap tdoc = translateDoc(schema, doc); - - String title = tdoc.get(CollectionSchema.title.getSolrFieldName()); + + String title = doc.get(CollectionSchema.title.getSolrFieldName()); // title is multivalued, after translation fieldname could be in tdoc. "title_0" ..., so get it from doc if (sz == 1) { writer.write("" + title + "\n\n"); } else {