Warning: session_start(): open(/var/lib/php/sessions/sess_fid7hvo92kc80umbdg58k9hott, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sclass SubSpace implements AI_PostHandler {
new MultiMap index;
new HashMap websByID;
// existence of triple has already been checked
public S postTriple(T3 t) {
Web web = webFromTriple(t);
websByID.put(web.globalID, web);
for (WebNode node : web_nodesAndRelations(web))
for (S text : asSet(node.texts()))
index.put(ai_shortenForIndex(text), node);
ret web.globalID;
}
}
static SubSpace subSpace;
p {
final new MultiMap bigCache;
ai_addWebToIndex_noNotify(bigCache, webFromTriple("a", "b", "c"));
cachedNodeIndex2_cache.set(bigCache);
assertTrue(func { ai_hasTriple("a", "b", "c") });
assertFalse(func { ai_hasTriple("love", "is", "nice") });
ai_setPostHandler(subSpace);
ai_postTriple("love", "is", "nice");
assertTrue(func { ai_hasTriple("a", "b", "c") });
assertFalse(func { bigCache.containsKey("nice") });
print("OK");
}