- fixed problem in collection index with deletion of single url references

- added automatic deletion of not-found snippets after search

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2689 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 00746ca232
commit d4c239e4be

@ -45,6 +45,10 @@ public class snippet {
//prop.put("text", (snippet.exists()) ? snippet.getLineMarked(queryHashes) : "unknown");
prop.put("text", (snippet.exists()) ? "<![CDATA["+snippet.getLineMarked(queryHashes)+"]]>" : "unknown");
} else {
String error = snippet.getError();
if (error.equals("no matching snippet found")) {
switchboard.removeReferences(indexURL.urlHash(url), query);
}
prop.put("text", snippet.getError());
}
prop.put("urlHash",indexURL.urlHash(url));

@ -221,6 +221,7 @@ public class kelondroCollectionIndex {
if (k instanceof byte[]) {if (oldcollection.remove((byte[]) k) != null) removed++;}
if (k instanceof String) {if (oldcollection.remove(((String) k).getBytes()) != null) removed++;}
}
oldcollection.shape();
collection = oldcollection;
}

Loading…
Cancel
Save