orbiter 17 years ago
parent fd9233244e
commit 670244849d

@ -1797,6 +1797,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// find all the words in a specific resource and remove the url reference from every word index
// finally, delete the url entry
if (urlhash == null) return 0;
// determine the url string
final indexURLReference entry = webIndex.getURL(urlhash, null, 0);
if (entry == null) return 0;
@ -1807,6 +1808,11 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
try {
// get the resource content
final Object[] resource = plasmaSnippetCache.getResource(comp.url(), fetchOnline, 10000, true, false);
if (resource == null) {
// delete just the url entry
webIndex.removeURL(urlhash);
return 0;
} else {
resourceContent = (InputStream) resource[0];
final Long resourceContentLength = (Long) resource[1];
@ -1828,6 +1834,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// finally delete the url entry itself
webIndex.removeURL(urlhash);
return count;
}
} catch (final ParserException e) {
return 0;
} finally {

Loading…
Cancel
Save