mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
For remote crawlReceipt add document abstract/description
enhance the returned metadata returned to the originator by description_txt to improve fulltext search result hits.
This commit is contained in:
parent
8af70950d9
commit
86073a5ba3
|
@ -1233,9 +1233,18 @@ public final class Protocol {
|
|||
parts.put("result", UTF8.StringBody(result));
|
||||
parts.put("reason", UTF8.StringBody(reason));
|
||||
parts.put("wordh", UTF8.StringBody(wordhashes));
|
||||
parts.put(
|
||||
"lurlEntry",
|
||||
UTF8.StringBody(((entry == null) ? "" : crypt.simpleEncode(entry.toString(), salt))));
|
||||
final String lurlstr;
|
||||
if (entry == null) {
|
||||
lurlstr = "";
|
||||
} else {
|
||||
final ArrayList<String> ldesc = entry.getDescription();
|
||||
if (ldesc.isEmpty()) {
|
||||
lurlstr = entry.toString();
|
||||
} else { // add document abstract/description as snippet (remotely stored in description_txt)
|
||||
lurlstr = entry.toString(ldesc.get(0));
|
||||
}
|
||||
}
|
||||
parts.put("lurlEntry", UTF8.StringBody(crypt.simpleEncode(lurlstr, salt)));
|
||||
// send request
|
||||
// final byte[] content = HTTPConnector.getConnector(MultiProtocolURI.yacybotUserAgent).post(new MultiProtocolURI("http://" + address + "/yacy/crawlReceipt.html"), 10000, target.getHexHash() + ".yacyh", parts);
|
||||
final HTTPClient httpClient = new HTTPClient(ClientIdentification.yacyInternetCrawlerAgent, 10000);
|
||||
|
|
Loading…
Reference in New Issue
Block a user