Skip to content

Commit

Permalink
- fixed problem in collection index with deletion of single url refer…
Browse files Browse the repository at this point in the history
…ences

- 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
  • Loading branch information
orbiter committed Oct 2, 2006
1 parent 00746ca commit d4c239e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htroot/xml/snippet.java
Expand Up @@ -45,6 +45,10 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
//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));
Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/kelondro/kelondroCollectionIndex.java
Expand Up @@ -221,6 +221,7 @@ private int putmergeremove(byte[] key, kelondroRowCollection collection, boolean
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;
}

Expand Down

0 comments on commit d4c239e

Please sign in to comment.