mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4136 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
143fa40d77
commit
97f1ca52bd
|
@ -389,7 +389,7 @@ public final class plasmaSearchEvent {
|
|||
startTime = System.currentTimeMillis();
|
||||
plasmaSnippetCache.TextSnippet snippet = plasmaSnippetCache.retrieveTextSnippet(comp.url(), snippetFetchWordHashes, fetchSnippetOnline, query.constraint.get(plasmaCondenser.flag_cat_indexof), 180, 3000, (fetchSnippetOnline) ? Integer.MAX_VALUE : 100000);
|
||||
long snippetComputationTime = System.currentTimeMillis() - startTime;
|
||||
serverLog.logInfo("SEARCH_EVENT", "text snippet load time for " + comp.url() + ": " + snippetComputationTime);
|
||||
serverLog.logInfo("SEARCH_EVENT", "text snippet load time for " + comp.url() + ": " + snippetComputationTime + ", " + ((snippet.getErrorCode() < 11) ? "snippet found" : ("no snippet found (" + snippet.getError() + ")")));
|
||||
|
||||
if (snippet.getErrorCode() < 11) {
|
||||
// we loaded the file and found the snippet
|
||||
|
|
|
@ -436,7 +436,14 @@ public final class yacyClient {
|
|||
// now create a plasmaIndex out of this result
|
||||
// System.out.println("yacyClient: " + ((urlhashes.length() == 0) ? "primary" : "secondary")+ " search result = " + result.toString()); // debug
|
||||
|
||||
final int results = Integer.parseInt((String) result.get("count"));
|
||||
int results = 0;
|
||||
try {
|
||||
results = Integer.parseInt((String) result.get("count"));
|
||||
} catch (NumberFormatException e) {
|
||||
yacyCore.log.logFine("SEARCH failed FROM " + target.hash + ":" + target.getName() + ", wrong output format");
|
||||
yacyCore.peerActions.peerDeparture(target, "search request to peer created number format exception");
|
||||
return null;
|
||||
}
|
||||
// System.out.println("***result count " + results);
|
||||
|
||||
// create containers
|
||||
|
|
Loading…
Reference in New Issue
Block a user