1
0
mirror of https://github.com/yacy/yacy_search_server.git synced 2025-07-22 09:14:38 -04:00

fix "null" title in response writer for documents with multivalued title

This commit is contained in:
reger
2014-12-26 18:23:26 +01:00
parent 73ba5d8ef7
commit 51ec9c1f44

@ -127,8 +127,8 @@ public class HTMLResponseWriter implements QueryResponseWriter {
int id = iterator.nextDoc();
Document doc = searcher.doc(id, DEFAULT_FIELD_LIST);
LinkedHashMap<String, String> 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>" + title + "</title>\n</head><body>\n");
} else {