How to use the debug.explain.structured function in debug

To help you get started, we’ve selected a few debug examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github o19s / splainer-search / services / solrSearchSvc.js View on Github external
var buildCallUrl = function(fieldList, solrUrl, solrArgs, queryText, config) {
      solrArgs.fl = (fieldList === '*') ? '*' : [fieldList.join(' ')];
      solrArgs.wt = ['json'];
      if (config.debug) {
        solrArgs.debug = ['true'];
        solrArgs['debug.explain.structured'] = ['true'];
      }
      if (config.highlight) {
        solrArgs.hl = ['true'];
        solrArgs['hl.fl'] = solrArgs.fl;
        solrArgs['hl.simple.pre'] = [svc.HIGHLIGHTING_PRE];
        solrArgs['hl.simple.post'] = [svc.HIGHLIGHTING_POST];
      }
      var baseUrl = solrUrlSvc.buildUrl(solrUrl, solrArgs);
      baseUrl = baseUrl.replace(/#\$query##/g, encodeURIComponent(queryText));
      return baseUrl;
    };
github o19s / splainer / app / scripts / services / solrSearchSvc.js View on Github external
var buildSolrUrl = function(fieldList, solrUrl, solrArgs, queryText) {
      solrArgs.fl = [fieldList.join(' ')];
      solrArgs.wt = ['json'];
      solrArgs.debug = ['true'];
      solrArgs['debug.explain.structured'] = ['true'];
      var baseUrl = buildUrl(solrUrl, solrArgs);
      baseUrl = baseUrl.replace(/#\$query##/g, encodeURIComponent(queryText));
      return baseUrl;
    };
github o19s / splainer-search / services / solrSearcherPreprocessorSvc.js View on Github external
var buildCallUrl = function(searcher) {
        var fieldList = searcher.fieldList;
        var url       = searcher.url;
        var config    = searcher.config;
        var args      = withoutUnsupported(searcher.args, config.sanitize);
        var queryText = searcher.queryText;

        args.fl = (fieldList === '*') ? '*' : [fieldList.join(' ')];
        args.wt = ['json'];

        if (config.debug) {
          args.debug = ['true'];
          args['debug.explain.structured'] = ['true'];
        }

        if (config.highlight) {
          args.hl                 = ['true'];
          args['hl.fl']           = args.fl;
          args['hl.simple.pre']   = [searcher.HIGHLIGHTING_PRE];
          args['hl.simple.post']  = [searcher.HIGHLIGHTING_POST];
        }

        if (config.escapeQuery) {
          queryText = solrUrlSvc.escapeUserQuery(queryText);
        }

        if ( !args.rows ) {
          args.rows = [config.numberOfRows];
        }
github o19s / splainer-search / splainer-search.js View on Github external
var buildCallUrl = function(searcher) {
        var fieldList = searcher.fieldList;
        var url       = searcher.url;
        var config    = searcher.config;
        var args      = withoutUnsupported(searcher.args, config.sanitize);
        var queryText = searcher.queryText;

        args.fl = (fieldList === '*') ? '*' : [fieldList.join(' ')];
        args.wt = ['json'];

        if (config.debug) {
          args.debug = ['true'];
          args['debug.explain.structured'] = ['true'];
        }

        if (config.highlight) {
          args.hl                 = ['true'];
          args['hl.fl']           = args.fl;
          args['hl.simple.pre']   = [searcher.HIGHLIGHTING_PRE];
          args['hl.simple.post']  = [searcher.HIGHLIGHTING_POST];
        }

        if (config.escapeQuery) {
          queryText = solrUrlSvc.escapeUserQuery(queryText);
        }

        if ( !args.rows ) {
          args.rows = [config.numberOfRows];
        }