lib/search.js
function queueLinks(cItem) {
  if (!cItem.queued || !cItem.queued.categories) {
    GLOBAL.error('missing queued || queued.categories', cItem.uri, cItem.queued);
    return;
  }
  var relevance = cItem.queued.relevance;
  if (relevance > 0) {
    relevance--;
    var links = contentLib.getRecognizedLinks(cItem);
    var categories = cItem.queued.categories;
    // FIXME: add callback
    for (var type in links) {
    var typeLinks = links[type], referers = [cItem.uri], state = utils.states.annotations.validated;
      // FIXME add referers
      typeLinks.forEach(function(uri) {
        queueLink(uri, { relevance: relevance, categories: categories, referers: referers, member: cItem.queued.member, state: state});
      });
    }
    return links;
  }
}
function queueLinks(cItem) {
  if (!cItem.queued || !cItem.queued.categories) {
    GLOBAL.error('missing queued || queued.categories', cItem.uri, cItem.queued);
    return;
  }
  var relevance = cItem.queued.relevance;
  if (relevance > 0) {
    relevance--;
    var links = contentLib.getRecognizedLinks(cItem);
    var categories = cItem.queued.categories;
    // FIXME: add callback
    for (var type in links) {
    var typeLinks = links[type], referers = [cItem.uri], state = utils.states.annotations.validated;
      // FIXME add referers
      typeLinks.forEach(function(uri) {
        queueLink(uri, { relevance: relevance, categories: categories, referers: referers, member: cItem.queued.member, state: state});
      });
    }
    return links;
  }
}
function queueLinks ( cItem ) { if ( ! cItem . queued || ! cItem . queued . categories ) { GLOBAL . error ( 'missing queued || queued.categories' , cItem . uri , cItem . queued ) ; return ; } var relevance = cItem . queued . relevance ; if ( relevance > 0 ) { relevance -- ; var links = contentLib . getRecognizedLinks ( cItem ) ; var categories = cItem . queued . categories ; // FIXME: add callback for ( var type in links ) { var typeLinks = links [ type ] , referers = [ cItem . uri ] , state = utils . states . annotations . validated ; // FIXME add referers typeLinks . forEach ( function ( uri ) { queueLink ( uri , { relevance : relevance , categories : categories , referers : referers , member : cItem . queued . member , state : state } ) ; } ) ; } return links ; } }
add relevant links from cItem
add relevant links from cItem