index = segment.termIndex().get(keyhash, null);
// built urlCache
final Iterator<WordReference> urlIter = index.entries();
final TreeMap<byte[], URIMetadataRow> knownURLs = new TreeMap<byte[], URIMetadataRow>(Base64Order.enhancedCoder);
final HandleSet unknownURLEntries = new HandleSet(WordReferenceRow.urlEntryRow.primaryKeyLength, WordReferenceRow.urlEntryRow.objectOrder, index.size());
Reference iEntry;
URIMetadataRow lurl;
while (urlIter.hasNext()) {
iEntry = urlIter.next();
lurl = segment.urlMetadata().load(iEntry.urlhash());
if (lurl == null) {
try {
unknownURLEntries.put(iEntry.urlhash());
} catch (final RowSpaceExceededException e) {
Log.logException(e);
}
urlIter.remove();
} else {
knownURLs.put(iEntry.urlhash(), lurl);
}
}
// make an indexContainerCache
final ReferenceContainerCache<WordReference> icc = new ReferenceContainerCache<WordReference>(Segment.wordReferenceFactory, Segment.wordOrder, Word.commonHashLength);