+ urlQuery + "&hitsPerDup=" + 0 + params);
}
for (int i = 0; i < length; i++) {
Hit hit = show[i];
HitDetails detail = details[i];
String title = detail.getValue("title");
String url = detail.getValue("url");
String id = "idx=" + hit.getIndexNo() + "&id=" + hit.getIndexDocNo();
if (title == null || title.equals("")) {
// use url for docs w/o title
title = url;
}
Element item = addNode(doc, channel, "item");
addNode(doc, item, "title", title);
addNode(doc, item, "description", summaries[i].toString());
addNode(doc, item, "link", url);
addNode(doc, item, "nutch", "site", hit.getDedupValue());
addNode(doc, item, "nutch", "cache", base + "/cached.do?" + id);
addNode(doc, item, "nutch", "explain", base + "/explain.do?" + id
+ "&query=" + urlQuery);
if (hit.moreFromDupExcluded()) {
addNode(doc, item, "nutch", "moreFromSite", requestUrl
+ "?query="
+ URLEncoder.encode("site:" + hit.getDedupValue() + " "
+ queryString, "UTF-8") + "&hitsPerSite=" + 0 + params);
}
for (int j = 0; j < detail.getLength(); j++) { // add all from detail
String field = detail.getField(j);
if (!SKIP_DETAILS.contains(field)) {
addNode(doc, item, "nutch", field, detail.getValue(j));
}
}
}
// dump DOM tree