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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user